aboutsummaryrefslogtreecommitdiff
path: root/libraries/libprof/Makefile
blob: 37b9a236d4891b7e02490e9a17eaa893b8c97ad2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
LIB = libprof.a

OBJS = gmon.o profil.o profiler.o memfunc.o

# Don't profile the profiling code, because that way lies madness (and recursion).
CFLAGS := $(subst -pg,,$(CFLAGS))

all: $(LIB)

# But do profile the mem functions
memfunc.o: memfunc.c
	$(CC) $(CFLAGS) -pg -c -o $@ $<

%.o : %.c
	$(CC) $(CFLAGS) -c -o $@ $<

%.o : %.S
	$(CC) $(CFLAGS) -c -o $@ $<

$(LIB): $(OBJS)
	$(AR) -r $@ $^

clean:
	rm -f $(OBJS) $(LIB)