#
# Makefile for rtEq
# Copyright (C) 2000-2002 Jussi Laako
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#

CXX = ng++
CXXFLAGS = -mcpu=athlon -march=athlon -O6 -fomit-frame-pointer -ffast-math -funroll-loops -malign-loops=5 -malign-jumps=5 -malign-functions=5 -mpreferred-stack-boundary=5 -mfancy-math-387 -Wall

DEFS = -D_REENTRANT -D_THREAD_SAFE
# Define if you don't have the commercial OSS driver
#DEFS += -DUSE_OSSLITE
# Define if you have ALSA 0.5
#DEFS += -DUSE_ALSA05
# Define if you have ALSA 0.9
DEFS += -DUSE_ALSA09

INCS = -I/usr/local/include `gtk-config --cflags`
LIBS = -L/usr/local/lib -ldsp -lasound `gtk-config --libs` -lpthread -lm #-lefence

PREFIX = /usr/local

SRCS = Audio.cc \
	AudioA.cc \
	AudioA2.cc \
	EqEngine.cc \
	EqGUI.cc \
	EqAInMod.cc \
	EqOInMod.cc \
	EqHInMod.cc \
	EqAOutMod.cc \
	EqOOutMod.cc \
	Main.cc \
	SockClie.cc \
	SockOp.cc

OBJS = Audio.o \
	AudioA.o \
	AudioA2.o \
	EqEngine.o \
	EqGUI.o \
	EqAInMod.o \
	EqOInMod.o \
	EqHInMod.o \
	EqAOutMod.o \
	EqOOutMod.o \
	Main.o \
	SockClie.o \
	SockOp.o

default: all

all: rteq

.cc.o: $(SRCS)
	$(CXX) $(CXXFLAGS) $(DEFS) $(INCS) -c $<

rteq: $(OBJS)
	$(CXX) -o rteq $(OBJS) $(LIBS)

rteq.dep: $(SRCS)
	$(CXX) -MM $(DEFS) $(INCS) $(SRCS) >rteq.dep

strip: rteq
	strip rteq

install: rteq
	install -m 755 rteq $(PREFIX)/bin

clean:
	rm -f core *.o *~ rteq.dep

cleanall:
	rm -f core *.o *~ rteq rteq.dep

include rteq.dep

