25 lines
398 B
Makefile
25 lines
398 B
Makefile
TARGET = quest
|
|
LIBS = -lm -luiohook
|
|
CC = gcc
|
|
CFLAGS = -g -Wall
|
|
|
|
.PHONY: default all clean
|
|
|
|
default: $(TARGET)
|
|
all: default
|
|
|
|
OBJECTS = $(patsubst src/%.c, %.o, $(wildcard src/*.c))
|
|
HEADERS = $(wildcard *.h)
|
|
|
|
%.o: src/%.c $(HEADERS)
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
.PRECIOUS: $(TARGET) $(OBJECTS)
|
|
|
|
$(TARGET): $(OBJECTS)
|
|
$(CC) $(OBJECTS) -Wall $(LIBS) -o $@
|
|
|
|
clean:
|
|
-rm -f *.o
|
|
-rm -f $(TARGET)
|