# Makefile
#
# for Is this... the end?
#
# by Spyros Paraschis
#

# Variables to control internal rules:

CC = gcc
CFLAGS = -Wall -mpentium -O2 -funroll-loops -ffast-math
TARGET_ARCH = -s
LDLIBS = -mwindows -l2xsai -lalleg 


# Variables:

SRCS = 2dstars.c 3dstars.c bonusscr.c demo.c display.c ending.c game.c main.c menu.c process.c  stats.c
OBJS = $(patsubst %.c,%.o,$(SRCS)) icon.o
EXE = theend.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

icon.o:
	windres -i theend.rc -o icon.o


# Cleaning target (only works with fileutils):

clean:
	del *.o


