CC = gcc
CCC = gcc

LDLIBS = `allegro-config --libs`
EXTRALIBS = -lstdc++				# gcc3.x.x
#CCFLAGS = `allegro-config --cflags`
CCFLAGS =

TARBALL = InfoSNES-01

# InfoSNES
OBJECTS += 65816.o dsp.o io.o ppu.o snes.o spu.o

# disspc
DISSPCOBJS += disspc.o

.SUFFIXES: .o .cpp .h 

all: InfoSNES disspc

InfoSNES: $(OBJECTS)
	$(CCC) $(INCLUDES) -o $@ $(OBJECTS) $(LDLIBS) $(EXTRALIBS) -lm -lz

disspc:	$(DISSPCOBJS)
	$(CCC) $(INCLUDES) -o $@ $(DISSPCOBJS) $(EXTRALIBS) -lm -lz	

.cpp.o:
	$(CCC) $(INCLUDES) -c $(CCFLAGS) $*.cpp -o $@

clean:
	rm -f $(OBJECTS) $(DISSPCOBJS) *~ *.dmp *.pcx core

cleanall:
	rm -f $(OBJECTS) $(DISSPCOBJS) *~ *.dmp *.pcx core InfoSNES disspc

release: clean all

tar:
	tar cvf $(TARBALL).tar ./*
	gzip $(TARBALL).tar

install:
	install ./InfoSNES ./disspc /usr/local/bin
