editor/makefile
Andrew Pamment 0aa48c58e2 Modified!
2021-12-14 21:42:16 +10:00

31 lines
601 B
Makefile

# makefile for text.c
CC=i686-quinn-gcc
CFLAGS=-Wall
OBJS=text.o page.o line.o prompt.o
HEADERS=$(subst .o,.h,$(OBJS)) # text.h page.h ...
LIBS=-lpdcurses -lSDL -lquinn -lfreetype -lpng -lz
text: $(OBJS)
$(CC) $(CFLAGS) -o text.exe $(OBJS) $(LIBS)
text.o: text.c $(HEADERS)
$(CC) $(CFLAGS) -c text.c
page.o: page.c page.h line.h
$(CC) $(CFLAGS) -c page.c
# '$<' expands to first prerequisite file
# NOTE: this rule is already implicit
%.o: %.c %.h
$(CC) $(CFLAGS) -c $< -o $@
.PHONY: cleanall clean cleantxt
cleanall: clean cleantxt
clean:
rm -f $(OBJS) text.exe
cleantxt:
rm -f *.txt