aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-04-13 01:40:16 +0200
committerMattias Andrée <maandree@kth.se>2021-04-13 01:40:16 +0200
commite0122e79c1f2b0a090ce1ba6bc7439f06fa1d237 (patch)
treeb99fe9384f2a5e8fc00494ee15b44fcad8df2b59 /Makefile
parentFirst commit (diff)
downloadsecauth-e0122e79c1f2b0a090ce1ba6bc7439f06fa1d237.tar.gz
secauth-e0122e79c1f2b0a090ce1ba6bc7439f06fa1d237.tar.bz2
secauth-e0122e79c1f2b0a090ce1ba6bc7439f06fa1d237.tar.xz
Make some fixes and add demos
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 14 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 2ee23b3..202fdce 100644
--- a/Makefile
+++ b/Makefile
@@ -25,11 +25,17 @@ OBJ =\
HDR =\
libsecauth.h
+BIN =\
+ demo-setup\
+ demo-login
+
LOBJ = $(OBJ:.o=.lo)
-all: libsecauth.a libsecauth.$(LIBEXT)
+all: libsecauth.a libsecauth.$(LIBEXT) $(BIN)
$(OBJ): $($@:.o=.c) $(HDR)
+demo-setup.o: demo-setup.c $(HDR)
+demo-login.o: demo-login.c $(HDR)
libsecauth.a: $(OBJ)
-rm -f -- $@
@@ -45,6 +51,12 @@ libsecauth.$(LIBEXT): $(LOBJ)
.c.lo:
$(CC) -fPIC -c -o $@ $< $(CFLAGS) $(CPPFLAGS)
+demo-setup: demo-setup.o libsecauth.a
+ $(CC) -o $@ demo-setup.o libsecauth.a $(LDFLAGS)
+
+demo-login: demo-login.o libsecauth.a
+ $(CC) -o $@ demo-login.o libsecauth.a $(LDFLAGS)
+
install: libsecauth.a libsecauth.$(LIBEXT)
mkdir -p -- "$(DESTDIR)$(PREFIX)/lib"
mkdir -p -- "$(DESTDIR)$(PREFIX)/include"
@@ -62,7 +74,7 @@ uninstall:
-rm -f -- "$(DESTDIR)$(PREFIX)/include/libsecauth.h"
clean:
- -rm -rf -- *.o *.a *.so *.lo *.su *.dll *.dylib
+ -rm -rf -- *.o *.a *.so *.lo *.su *.dll *.dylib democonfig $(BIN)
.SUFFIXES:
.SUFFIXES: .c .o .lo