aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2020-05-30 17:34:29 +0200
committerMattias Andrée <maandree@kth.se>2020-05-30 17:34:29 +0200
commit712f56fe3369c59d32b9000830b4ed7b25ed24b5 (patch)
tree27ddf931fd2d980d0c4dcdfb025f26f5380fb5d6 /Makefile
parentPrint errno names and strings (diff)
downloadsctrace-712f56fe3369c59d32b9000830b4ed7b25ed24b5.tar.gz
sctrace-712f56fe3369c59d32b9000830b4ed7b25ed24b5.tar.bz2
sctrace-712f56fe3369c59d32b9000830b4ed7b25ed24b5.tar.xz
Add support for tracing fork children
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 22 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 1d032bc..3631779 100644
--- a/Makefile
+++ b/Makefile
@@ -3,10 +3,27 @@
CONFIGFILE = config.mk
include $(CONFIGFILE)
+OBJ =\
+ consts.o\
+ memory.o\
+ print.o\
+ process.o\
+ sctrace.o\
+ util.o
+
+HDR =\
+ arg.h\
+ common.h\
+ list-errnos.h
+
all: sctrace
+$(OBJ): $(@:.o=.c) $(HDR)
+
+sctrace: $(OBJ)
+ $(CC) -o $@ $(OBJ) $(LDFLAGS)
-sctrace: sctrace.c arg.h list-errnos.h
- $(CC) -o $@ $@.c $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
+.c.o:
+ $(CC) -c -o $@ $< $(CPPFLAGS) $(CFLAGS)
list-errnos.h:
printf '#define LIST_ERRNOS(_)\\\n\t' > $@
@@ -25,4 +42,7 @@ uninstall:
clean:
-rm -f -- *.o list-errnos.h sctrace
+.SUFFIXES:
+.SUFFIXES: .c .o
+
.PHONY: all install uninstall clean