aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-03-04 10:45:10 +0100
committerMattias Andrée <maandree@kth.se>2016-03-04 10:47:53 +0100
commitaff09967d194d062ae8d83c0fbe1edf158804ef9 (patch)
tree793f32bc01e780bb6457570f9ea7a8e7ff94f7bb /Makefile
parentAdd makefile and fix errors (diff)
downloadlibzahl-aff09967d194d062ae8d83c0fbe1edf158804ef9.tar.gz
libzahl-aff09967d194d062ae8d83c0fbe1edf158804ef9.tar.bz2
libzahl-aff09967d194d062ae8d83c0fbe1edf158804ef9.tar.xz
Clean up, fix a few bugs, and add a test
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 0670292..f3a6ad7 100644
--- a/Makefile
+++ b/Makefile
@@ -56,7 +56,7 @@ FUN =\
OBJ = $(FUN:=.o)
MAN = $(foreach F,$(FUN),man/$(F).3) man/libzahl.7
-all: libzahl.a
+all: libzahl.a test
%.o: src/%.c $(HDR) config.mk
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
@@ -65,7 +65,10 @@ libzahl.a: $(OBJ)
$(AR) rc $@ $?
$(RANLIB) $@
+test: test.c libzahl.a
+ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) -o $@ $^
+
clean:
- -rm -- *.o *.su *.a *.so 2>/dev/null
+ -rm -- *.o *.su *.a *.so test 2>/dev/null
.PHONY: all clean