# Makefile  - amp  audio mpeg player v0.7
# tomislav uzelac  1996,1997

#
# optimize options for different platforms. choose the appropriate
#

#
# AmigaOS
#
 CC = gcc
 CFLAGS = -O2 -funroll-loops -mstackextend -m68020 -m68881 -DNO_BYTE_SWAPPING -DMONO -DFREQDIV

#
# 486/linux ##########################################################
#
# CC = gcc
# CFLAGS = -Wall -O3 -ffast-math -fomit-frame-pointer -m486 -DNO_BYTE_SWAPPING -DA_SIF_LINUX

#
# pentium/linux , but use a pentium optimised gcc
#
#CC = gcc
#CFLAGS = -Wall -mpentium -O6 -fomit-frame-pointer -ffast-math -pipe -DNO_BYTE_SWAPPING -DA_SIF_LINUX


#
# SOLARIS ############################################################
#
#CC = /opt/SUNWspro/bin/cc 
#CFLAGS = -xO5 -fns -dalign -ftrap=%none -xtarget=native -xlibmil -xsafe=mem -DA_SIF_ULTRA -Dinline=""

#
# sun ultra with gcc
#
#CC = gcc
#CFLAGS = -O3 -fschedule-insns2 -DA_SIF_ULTRA

#
# IRIX ###############################################################
# 
#CC = gcc
#CFLAGS = -O2 -DA_SIF_IRIX -Dinline=
#LDFLAGS = -laudio

#
# if you have later versions of the SGI compiler, use this, with your arch substituted
#
#CC = 
#CFLAGS = -Ofast=ip22_4k -Dinline= -DA_SIF_IRIX
#LDFLAGS = -Ofast=ip22_4k -laudio


#
# HP-UX ##############################################################
#

#CC = /opt/ansic/bin/cc
#CFLAGS = +O3 +Oall -Ae -Dinline= -DA_SIF_HPUX

#CC = gcc
#CFLAGS = -O3 -ffast-math -funroll-loops -fomit-frame-pointer \
#         -mpa-risc-1-1 -mschedule=7100  -DA_SIF_HPUX
#LDFLAGS = -L/lib/pa1.1


######################################################################

#
# uncomment this for debugger support
#
#GGDB = -ggdb
#D_FLAGS= -DDEBUG_HUFFMAN -DDEBUG_REQ
#CFLAGS = -Wall -DNO_BYTE_SWAPPING -DA_SIF_LINUX $(D_FLAGS)

#
# uncomment both of these if you want profiling support
#
#PG = -pg
#LDFLAGS = -pg


#
# you should probably leave these untouched ####################################
#
 
OBJ = audio.o getbits.o getdata.o huffman.o dump.o misc2.o transform.o formats.o layer3.o

LIBS = 

all: amp

.PHONY: clean dep 
clean:
	rm -f *.o amp

amp: $(OBJ) 
	$(CC) -o amp $(OBJ) $(LDFLAGS) $(LIBS) 

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

dep:
	gcc -MM *.c > .depend

-include .depend
