summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2021-09-02 17:23:42 +0300
committergramanas <anastasis.gramm2@gmail.com>2021-09-02 17:23:42 +0300
commit9deed51aa2df7ca5979963f7452a6439ad2d3767 (patch)
tree7ceea0494c01eeff7e7fdaaa8b1bfc7e5adf62c1 /Makefile
downloadfoodtools-9deed51aa2df7ca5979963f7452a6439ad2d3767.tar.gz
foodtools-9deed51aa2df7ca5979963f7452a6439ad2d3767.tar.bz2
foodtools-9deed51aa2df7ca5979963f7452a6439ad2d3767.zip
initial
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile28
1 files changed, 28 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..99629f0
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,28 @@
+TARGET=c.out
+SRC=*.c
+CC=gcc
+CFLAGS=-D_GNU_SOURCE -std=c99 -pedantic
+REL_FLAGS=-O3
+DBG_FLAGS=-Wall -g3
+# LIBS=-l X11
+
+make: $(SRC)
+ $(CC) $(REL_FLAGS) $(CFLAGS) -o $(TARGET) $^ $(LIBS)
+
+debug: $(SRC)
+ $(CC) $(DBG_FLAGS) -D_FOOD_DEBUG -fsanitize=address $(CFLAGS) -o $(TARGET) $^ $(LIBS)
+
+noasan: $(SRC)
+ $(CC) $(DBG_FLAGS) $(CFLAGS) -o $(TARGET) $^ $(LIBS)
+
+.PHONY: clean
+
+clean:
+ rm -f *.o
+ rm -f $(TARGET)
+
+install: $(TARGET)
+ @cp -v $(TARGET) /usr/local/bin/$(TARGET)
+
+uninstall:
+ @rm -v /usr/local/bin/$(TARGET)