quest/Makefile

25 lines
398 B
Makefile
Raw Normal View History

2021-09-05 02:50:19 +10:00
TARGET = quest
2021-08-28 01:43:33 +10:00
LIBS = -lm -luiohook
2021-08-11 23:50:59 +10:00
CC = gcc
CFLAGS = -g -Wall
.PHONY: default all clean
default: $(TARGET)
all: default
2021-09-17 09:25:36 +10:00
OBJECTS = $(patsubst src/%.c, %.o, $(wildcard src/*.c))
2021-08-11 23:50:59 +10:00
HEADERS = $(wildcard *.h)
2021-09-17 09:25:36 +10:00
%.o: src/%.c $(HEADERS)
2021-08-11 23:50:59 +10:00
$(CC) $(CFLAGS) -c $< -o $@
.PRECIOUS: $(TARGET) $(OBJECTS)
$(TARGET): $(OBJECTS)
$(CC) $(OBJECTS) -Wall $(LIBS) -o $@
clean:
-rm -f *.o
-rm -f $(TARGET)