diff options
Diffstat (limited to '')
-rw-r--r-- | Makefile | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d93205d --- /dev/null +++ b/Makefile @@ -0,0 +1,35 @@ +.POSIX: + +CONFIGFILE = config.mk +include $(CONFIGFILE) + + +OBJ =\ + addressbook.o + +HDR = + + +all: addressbook +$(OBJ): $(@:.o=.c) $(HDR) + +.c.o: + $(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS) + +addressbook: $(OBJ) + $(CC) -o $@ $(OBJ) $(LDFLAGS) + +install: addressbook + mkdir -p -- "$(DESTDIR)$(PREFIX)/bin/" + cp -- addressbook "$(DESTDIR)$(PREFIX)/bin/" + +uninstall: + -rm -f -- "$(DESTDIR)$(PREFIX)/bin/addressbook" + +clean: + -rm -f -- *.o *.a *.su $(OBJ) addressbook + +.SUFFIXES: +.SUFFIXES: .c .o + +.PHONY: all install uninstall clean |