aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2018-03-07 15:25:07 -0500
committerClyne Sullivan <tullivan99@gmail.com>2018-03-07 15:25:07 -0500
commit952cb2d6dbd1b4cd76bb7c5dd46c1053631476a3 (patch)
treec1c1c89355d242489b551bd4390bdd2a68682926 /Makefile
parent0fb67b8d66ffd47ede0a0a5d09380943722414e9 (diff)
big changes; no ints; things work better
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 14 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 8bca3c1..b4a7bfc 100644
--- a/Makefile
+++ b/Makefile
@@ -7,13 +7,17 @@ CFLAGS = -Wall -Wextra -Werror -pedantic \
-Wno-discarded-qualifiers \
-I. -fsigned-char -fno-builtin -ggdb
-all:
- $(CC) $(CFLAGS) -c shelpers.c
- $(CC) $(CFLAGS) -c parser.c
- $(CC) $(CFLAGS) -c builtins.c
- $(CC) $(CFLAGS) -c stack.c
- $(CC) $(CFLAGS) -c ops.c
- $(CC) $(CFLAGS) -c variable.c
- $(AR) r libinterp.a *.o
- @rm -f *.o
- #$(CC) $(CFLAGS) shell.c *.o -o shell
+FILES = $(wildcard *.c)
+OUTFILES = $(patsubst %.c, %.o, $(FILES))
+
+all: $(OUTFILES)
+ @#$(CC) $(CFLAGS) *.o -o shell
+ @$(AR) r libinterp.a *.o
+
+clean:
+ @echo " CLEAN"
+ @rm -f *.o shell libinterp.a
+
+%.o: %.c
+ @echo " CC " $<
+ @$(CC) $(CFLAGS) -c $< -o $@