aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Liodden <eriklio@stud.ntnu.no>2017-11-30 15:30:23 +0100
committerErik Liodden <eriklio@stud.ntnu.no>2017-11-30 15:30:23 +0100
commit27d5e32236fdbd4eba7a2a1e344c59b568f2eb98 (patch)
tree5ff9a82211cb157f46140d2ed027cf92acb3bb22
parent6c9b2ee5b8e96ff66926d37626320cb7f7c1f0b1 (diff)
downloadalgdat-27d5e32236fdbd4eba7a2a1e344c59b568f2eb98.tar.gz
add test target
`make test` will compile test.c useful for checking stuff.
-rw-r--r--Makefile13
1 files changed, 7 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 077faf4..01b0aa4 100644
--- a/Makefile
+++ b/Makefile
@@ -5,17 +5,18 @@ AR=ar
PROG= oving1
-all: $(PROG)
-debug : CFLAGS += -O0 -g
-debug : clean all
-
LIB_OBJS=stack.o queue.o llist.o io.o misc.o
LIB_FILE=libalgdat.a
LIB_H=structure.h misc.h io.h
-
LIBS = $(LIB_FILE)
+all: $(PROG)
+test: test.c
+debug: CFLAGS += -O0 -g
+debug: clean all
+lib: $(LIB_FILE)
+
$(LIB_FILE): $(LIB_OBJS)
@echo \ [AR] $@
@$(AR) rcs $@ $(LIB_OBJS)
@@ -30,7 +31,7 @@ $(LIB_FILE): $(LIB_OBJS)
clean:
- rm -rf *.o $(PROG) $(LIB_FILE) *.dSYM
+ rm -rf *.o $(PROG) $(LIB_FILE) *.dSYM test
backup: clean
cd .. ; tar czvf algdat.tar.gz algdat