summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2020-03-27 16:53:14 -0400
committerJakob Kaivo <jkk@ung.org>2020-03-27 16:53:14 -0400
commit1a21f9e690a5e5b334a5c5fbc2b4d1f71d00d43d (patch)
treead9b6733871fc075315c6512d8509df5066303e4 /Makefile
parent2a15bdb94ea913b361c026541eff3cfdcffccde6 (diff)
initial support for adding local headers as dependencies
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile29
1 files changed, 22 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index cb52921..42f869c 100644
--- a/Makefile
+++ b/Makefile
@@ -10,27 +10,42 @@ CC=c99
LD=$(CC)
CFLAGS=-Wall -Wextra -Wpedantic -Werror -g
LDFLAGS=
+LDLIBS=
all: maje
clean:
rm -f maje *.o
-maje: make.o
-make.o: make.c
- $(CC) $(CFLAGS) -c make.c
+maje: includes.o
+includes.o: maje.h
+includes.o: includes.c
+ $(CC) $(CFLAGS) -c includes.c
-maje: sources.o
-sources.o: sources.c
- $(CC) $(CFLAGS) -c sources.c
+maje: list.o
+list.o: maje.h
+list.o: list.c
+ $(CC) $(CFLAGS) -c list.c
maje: main.o
+main.o: maje.h
main.o: main.c
$(CC) $(CFLAGS) -c main.c
maje: maje.o
+maje.o: maje.h
maje.o: maje.c
$(CC) $(CFLAGS) -c maje.c
+maje: make.o
+make.o: maje.h
+make.o: make.c
+ $(CC) $(CFLAGS) -c make.c
+
+maje: sources.o
+sources.o: maje.h
+sources.o: sources.c
+ $(CC) $(CFLAGS) -c sources.c
+
maje:
- $(LD) $(LDFLAGS) -o $@ *.o
+ $(LD) $(LDFLAGS) -o $@ *.o $(LDLIBS)