From 8c0607dacc71d9406f6cfb36e105a76828703cea Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 15 Apr 2021 18:44:28 +0200 Subject: First commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Makefile (limited to 'Makefile') 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 -- cgit v1.2.3-70-g09d2