aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-04-15 18:44:28 +0200
committerMattias Andrée <maandree@kth.se>2021-04-15 18:47:45 +0200
commit8c0607dacc71d9406f6cfb36e105a76828703cea (patch)
treed33f9198d5e5f523cc7992d9689c155b5a2a02d1 /Makefile
downloadaddressbook-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--Makefile35
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