NAME = psychopyretic
CC = gcc
CFLAGS = -g -Wall -O2
LFLAGS = -g -O2
LIBS = `allegro-config --libs` -lz -lpng -lldpng
OFILES = allegro-initialize.o character.o crate.o npc.o vector.o map.o
EXES = pyretic
VERSION = 0.0.1alpha

all: $(EXES)

pyretic: $(OFILES) main.o
	$(CC) $(LFLAGS) -o $@ $(OFILES) main.o $(LIBS)

makemap: makemap.o map.o character.o
	$(CC) $(LFLAGS) -o $@ map.o character.o makemap.o $(LIBS)

.o.c:
	$(CC) -c $(CFLAGS) $<

clean: 
	-rm $(EXES) *.o

dist: clean
	cd ..; tar czvf $(NAME)-$(VERSION).tar.gz $(NAME)/ --exclude=\.svn

# distclean: clean
# 	-rm config.* Makefile
