Added Makefile

master
Aadhavan Srinivasan 2 years ago
parent 438bd61c0d
commit bb8917645e

@ -0,0 +1,23 @@
EXEC_FILE=editor
CFLAGS=
all: $(EXEC_FILE)
$(EXEC_FILE): $(EXEC_FILE).o
gcc $(CFLAGS) -o $@ $^ -lncurses
$(EXEC_FILE).o: $(EXEC_FILE).c
gcc $(CFLAGS) -c -o $@ $^
.PHONY: debug
debug: CFLAGS+=-g
debug: $(EXEC_FILE)
.PHONY: allwarn
allwarn: CFLAGS+=-Wall -Wextra -pedantic
allwarn: $(EXEC_FILE)
.PHONY: clean
clean:
rm $(EXEC_FILE)
rm $(EXEC_FILE).o
Loading…
Cancel
Save