diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 24 |
1 files changed, 22 insertions, 2 deletions
@@ -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 |