###########################################
#
# makefile for styx
#
###########################################

# compiler
CC = g++

CFLAGS = \
	-O2\
	-fomit-frame-pointer\
	-ffast-math\
	-funroll-loops\
	-W\
	-Wall

# o-files
OBJ_DIR = .

ALL_OBJ =	Game.o \
			Intro.o \
			Main.o \
			My_sprit.o \
			Sh_alleg.o \
			Sh_sprit.o

# merge o-files and prepend path
OBJS = $(addprefix $(OBJ_DIR)/, $(ALL_OBJ))

# compile cpp to o
$(OBJ_DIR)/%.o: ./%.cpp
	$(CC) $(CFLAGS) -c $< -o $@


# output filename
OUTPUT = styx

# output location
OUTPUT_DIR = ..

# main rule
$(OUTPUT): $(OBJS)
	$(CC) $(OBJS) -o $(OUTPUT_DIR)/$@ `allegro-config --libs` -s



