#
# Makefile for midisquare
#
CC	= gcc

# some standard tools
MKDIR	= mkdir -p
CP	= cp -r -p
RM	= rm -f

WARN	= -Wall
OPT	= -O2

# hardware configuration:
# uncomment if your atari has a CPU better than 68000 but no FPU
#CPU	= -m68020-60
# uncomment if your atari has a CPU better than 68000 and a FPU
#CPU	= -m68020-60 -m68881

CFLAGS	= -g $(WARN) $(OPT) $(CPU)

OBJS	= midisqar.o
LIBS	= -lcflib -lgem -liio
PROG	= midisqar.app

# targets
default: all

all: $(PROG)

$(PROG): $(OBJS)
	$(CC) $(CPU) -o $@ $(OBJS) $(LIBS)

# maintainer targets
dist: all
	$(RM) midisqar.lzh
	$(MKDIR) midisqar
	$(CP) german midisqar.* news.txt Makefile midisqar/
	$(RM) midisqar/midisqar.o
	strip midisqar/$(PROG)
	lharc u -rqXm midisqar.lzh midisqar/ 
	$(RM) -r midisqar

clean:
	$(RM) *.o

realclean: clean
	$(RM) *.app *.bak *~ *.lzh

# explicit dependencies
$(OBJS): midisqar.h
