diff options
Diffstat (limited to 'libraries/libprof/Makefile')
-rw-r--r-- | libraries/libprof/Makefile | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/libraries/libprof/Makefile b/libraries/libprof/Makefile new file mode 100644 index 0000000..28bedea --- /dev/null +++ b/libraries/libprof/Makefile @@ -0,0 +1,24 @@ +LIB = libprof.a + +OBJS = gmon.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) |