summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2021-11-13 21:05:38 +0200
committergramanas <anastasis.gramm2@gmail.com>2021-11-14 11:07:42 +0200
commit382da0ada99a2874052f0e6ccb2c25e012d47fc9 (patch)
treea92357f558dab48f376e666594da4aa6576f4861 /Makefile
parent2e00a24994e094efc47fce4501b134caa801ea2c (diff)
downloadfoodtools-382da0ada99a2874052f0e6ccb2c25e012d47fc9.tar.gz
foodtools-382da0ada99a2874052f0e6ccb2c25e012d47fc9.tar.bz2
foodtools-382da0ada99a2874052f0e6ccb2c25e012d47fc9.zip
Update Makefile and add list ingredients draft
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile44
1 files changed, 23 insertions, 21 deletions
diff --git a/Makefile b/Makefile
index 82c9da1..3b011df 100644
--- a/Makefile
+++ b/Makefile
@@ -1,33 +1,35 @@
-TARGET=food
-SRC=*.c
CC=gcc
-CFLAGS=-D_GNU_SOURCE -std=c99 -pedantic
-REL_FLAGS=-O3
-DBG_FLAGS=-Wall -g3
-make: $(SRC)
- $(CC) $(REL_FLAGS) $(CFLAGS) -o $(TARGET) $^ $(LIBS)
+CFLAGS=-D_GNU_SOURCE -std=c99 -pedantic -O3
+DBG_FLAGS=-Wall -g3 -D_FOOD_DEBUG -fsanitize=address -Og
-debug: $(SRC)
- $(CC) $(DBG_FLAGS) -D_FOOD_DEBUG -fsanitize=address $(CFLAGS) -o $(TARGET) $^ $(LIBS)
+SRC=src/*.c
-noasan: $(SRC)
- $(CC) $(DBG_FLAGS) $(CFLAGS) -o $(TARGET) $^ $(LIBS)
+.PHONY: all debug clean
-tests:
- $(MAKE) -C test
+all: food #eval
-clean-tests:
- $(MAKE) clean -C test
+food: $(SRC) food.c
+ $(CC) $(CFLAGS) -o food $^ $(LIBS)
-.PHONY: clean
+eval: $(SRC) eval.c
+ $(CC) $(CFLAGS) -o eval $^ $(LIBS)
+
+debug: CFLAGS += $(DBG_FLAGS)
+debug: all
clean:
rm -f *.o
- rm -f $(TARGET)
+ rm -f food eval
+
+# tests:
+# $(MAKE) -C test
+
+# clean-tests:
+# $(MAKE) clean -C test
-install: $(TARGET)
- @cp -v $(TARGET) /usr/local/bin/$(TARGET)
+# install: $(TARGET)
+# @cp -v $(TARGET) /usr/local/bin/$(TARGET)
-uninstall:
- @rm -v /usr/local/bin/$(TARGET)
+# uninstall:
+# @rm -v /usr/local/bin/$(TARGET)