#########################################
#                                       #
#         Makefile for Apollo 29        #
#                                       #
#       Apollo 29 speedhack entry       #
#                                       #
#              by Neil Roy              #
#                                       #
#(modified from George Foot's makefile) #
#########################################


# Variables to control internal rules:

CC = gcc
CFLAGS = -O3 -Wall -g
TARGET_ARCH = -m486
LDLIBS = -lalleg


# Variables:

SRCS = apollo29.c
OBJS = $(patsubst %.c,%.o,$(SRCS))
EXE = apollo29.exe


# Phony targets:

.PHONY: all clean deps


# All:

all: $(EXE)


# How to make the executable:

$(EXE): $(OBJS)
	$(LINK.o) $^ $(LDLIBS) $(LOADLIBES) -o $@


# How to make the object files:

-include deps.mak

# (deps.mak is generated by `make deps' as below)


# Dependencies:

deps:
	gcc -MM $(SRCS) > deps.mak


# Cleaning target (only works with fileutils):

clean:
	rm -f $(OBJS) $(EXE)

