summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 10 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index df15d2e..6bc7ad1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,17 +1,20 @@
TARGET=fcomp
-SRC=fcomp.c
+SRC=*.c
+OBJ=fcomp.o linenoise.o
CC=gcc
CFLAGS=-D_GNU_SOURCE -std=c99 -pedantic
REL_FLAGS=-O3
DBG_FLAGS=-Wall -g3
-make:
- $(CC) -o $(TARGET) $(SRC) $(CFLAGS) $(REL_FLAGS)
+COMPILE=$(CC) -o $(TARGET) $(SRC) $(CFLAGS) -Ilib
-debug:
- $(CC) -o $(TARGET) $(SRC) $(CFLAGS) $(DBG_FLAGS) -fsanitize=address
+make: $(SRC)
+ $(CC) $(REL_FLAGS) $(CFLAGS) -o $(TARGET) $^
-noasan:
- $(CC) -o $(TARGET) $(SRC) $(CFLAGS) $(DBG_FLAGS)
+debug: $(SRC)
+ $(CC) $(DBG_FLAGS) -fsanitize=address $(CFLAGS) -o $(TARGET) $^
+
+noasan: $(SRC)
+ $(CC) $(DBG_FLAGS) $(CFLAGS) -o $(TARGET) $^
.PHONY: clean