aboutsummaryrefslogtreecommitdiff
path: root/libraries/libprof/Makefile
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2018-04-06 16:14:43 -0400
committerPaul Selkirk <paul@psgd.org>2018-04-06 22:34:05 -0400
commit6c7bd80b4e7bc5af1659b14b7fb0038f3dc53989 (patch)
treea10451c611dcf9f7d31a019c6bbc2e81fc8cd9ac /libraries/libprof/Makefile
parentb35b87ea14016760786319a23b87792f1e1041de (diff)
parentf508e24f5b872a8f7d642eb4fb2217dd1497de96 (diff)
Merge branch 'profiling'
Diffstat (limited to 'libraries/libprof/Makefile')
-rw-r--r--libraries/libprof/Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/libraries/libprof/Makefile b/libraries/libprof/Makefile
new file mode 100644
index 0000000..4fe5fb4
--- /dev/null
+++ b/libraries/libprof/Makefile
@@ -0,0 +1,20 @@
+LIB = libprof.a
+
+OBJS = gmon.o profil.o profiler.o
+
+# Don't profile the profiling code, because that way lies madness (and recursion).
+CFLAGS := $(subst -pg,,$(CFLAGS))
+
+all: $(LIB)
+
+%.o : %.c
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+%.o : %.S
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+$(LIB): $(OBJS)
+ $(AR) -r $@ $^
+
+clean:
+ rm -f $(OBJS) $(LIB)