

CXXFLAGS= -D__NO_MATH_INLINES\
 -pipe -fno-exceptions \
 -O -ffast-math -fomit-frame-pointer -march=i586 -mcpu=i586 \
 -Wall -Wstrict-prototypes -Wconversion  -Winline \
 -I../src/include/ -I../src/fxt/include/ -I../src/fxt/auxil/ -I../src/fxt/mult/

#
#
SRC=$(wildcard test?.cc) main.cc

#
OBJ=$(SRC:.cc=.o)


# name of the binary:
#
BIN=../bin/te

# required libs
# order is important
MYLIBS=  ../bin/libhflt.a ../src/fxt/libfxt.a 
LIBS=    $(MYLIBS) -lstdc++ -lm



.PHONY: all
all:  $(BIN) 

#.PHONY: crash
#crash:
#	$(CXX) $(CXXFLAGS)  crash.cc $(LIBS) -o ../cr
#	catchsegv ../cr



$(BIN): $(OBJ)  $(MYLIBS)
	$(CXX) $(CXXFLAGS)  $(OBJ) $(LIBS) -o $(BIN)



#-------------------------------------

#DEP=depend.mk
#
#include $(DEP)
#
#.PHONY: dep depend
#depend dep:
#	rm -f $(DEP)
#	$(MAKE) $(DEP)
#
#$(DEP):
#	$(CXX) -MM $(INCFLAG) -I../src/include/ $(SRC) > $(DEP)
#

#-------------------------------------


.PHONY: clean
clean:
	rm -f *.o
	rm -f .gdb_history 

.PHONY: clobber
clobber: clean
	rm -f $(BIN)
