You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
358 B
Makefile
24 lines
358 B
Makefile
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
|