summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2020-07-20 19:30:46 +0300
committergramanas <anastasis.gramm2@gmail.com>2020-07-20 19:30:46 +0300
commit2b31f69a1a17e153adb08d9a0ad125972e957971 (patch)
tree13797fb470179e3e78a8e7b15c31db5070728902 /Makefile
downloadxlnch-2b31f69a1a17e153adb08d9a0ad125972e957971.tar.gz
xlnch-2b31f69a1a17e153adb08d9a0ad125972e957971.tar.bz2
xlnch-2b31f69a1a17e153adb08d9a0ad125972e957971.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..172219f
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,28 @@
+TARGET=xlnch
+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) -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)