diff options
author | Mattias Andrée <maandree@kth.se> | 2021-04-15 18:44:28 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-04-15 18:47:45 +0200 |
commit | 8c0607dacc71d9406f6cfb36e105a76828703cea (patch) | |
tree | d33f9198d5e5f523cc7992d9689c155b5a2a02d1 /Makefile | |
download | addressbook-8c0607dacc71d9406f6cfb36e105a76828703cea.tar.gz addressbook-8c0607dacc71d9406f6cfb36e105a76828703cea.tar.bz2 addressbook-8c0607dacc71d9406f6cfb36e105a76828703cea.tar.xz |
First commit
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'Makefile')
-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 |