aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Liodden <eriklio@stud.ntnu.no>2017-11-16 18:41:37 +0100
committerErik Liodden <eriklio@stud.ntnu.no>2017-11-16 18:41:37 +0100
commitc81d03de5df49d352e3f76890d08d2c30a4acac9 (patch)
tree0f5d8c57d87babec559699524c55afaed9af3bd5
parentdd4d262fc497aa9a0ecd13c64c0a8a27dda48580 (diff)
downloadalgdat-c81d03de5df49d352e3f76890d08d2c30a4acac9.tar.gz
more compact makefile
also added more silent output
-rw-r--r--Makefile17
1 files changed, 8 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 8be7414..4cbf89a 100644
--- a/Makefile
+++ b/Makefile
@@ -14,17 +14,16 @@ LIB_H=structure.h misc.h io.h
LIBS = $(LIB_FILE)
$(LIB_FILE): $(LIB_OBJS)
- $(AR) rcs $@ $(LIB_OBJS)
+ @echo \ [AR] $@
+ @$(AR) rcs $@ $(LIB_OBJS)
%: %.c $(LIB_FILE)
- $(CC) $(CFLAGS) -o $@ $(filter %.c,$^) $(LIBS)
-
-oving1.o: $(LIB_H)
-misc.o: $(LIB_H)
-io.o: $(LIB_H)
-stack.o: $(LIB_H)
-queue.o: $(LIB_H)
-llist.o: $(LIB_H)
+ @echo \ [CC] $@
+ @$(CC) $(CFLAGS) -o $@ $(filter %.c,$^) $(LIBS)
+
+%.o: %.c $(LIB_H)
+ @echo \ [CC] $@
+ @$(CC) $(CFLAGS) -o $@ -c $<
clean: