# Do not edit, this is file generated by m4 from Makefile.4sim.m4 and 
#  copied to the simulations while installation! 
# Make your changes in Makefile.conf.
#  E.g. add there files to compile or custom libs and so on.

## File:     Makefile for selforg simulations
## Author:   Georg Martius  <martius@informatik.uni-leipzig.de>
## Date:     Oct 2009




# m4 file
 




EXEC = start
## add files to compile in the conf file
include Makefile.conf

CFILES = $(addsuffix .cpp, $(FILES))
OFILES = $(addsuffix .o, $(FILES))

# the CFGOPTS are set by the opt and dbg target
CFGOPTS=
LIBS   += $(shell selforg-config $(CFGOPTS) --static --libs)
INC    += -I.





## use -pg for profiling
CPPFLAGS = -Wall -pipe -Wno-deprecated $(INC) $(shell selforg-config $(CFGOPTS) --intern --cflags) 

CXX = g++

normal:  
	$(MAKE) $(EXEC)
opt   : 
	$(MAKE) CFGOPTS=--opt EXEC=$(EXEC)_opt $(EXEC)
dbg   : 
	$(MAKE) CFGOPTS=--dbg EXEC=$(EXEC)_dbg $(EXEC)
shared:   
	$(MAKE) BASELIBS="$(BASELIBSSHARED)" LIBSELFORG="$(LIBSELFORGSHARED)" $(EXEC)

$(EXEC): Makefile.depend $(OFILES) 
	$(CXX) $(OFILES) $(LIBS) -o $(EXEC)



depend: 
	makedepend -- $(CPPFLAGS) -- $(CFILES) -f- > Makefile.depend 2>/dev/null

Makefile.depend:
	makedepend -- $(CPPFLAGS) -- $(CFILES) -f- > Makefile.depend 2>/dev/null

todo:
	find -name "*.[ch]*" -exec grep -Hni "TODO" {} \;

tags: 
	etags $(find -name "*.[ch]")

clean:
	rm -f $(EXEC) $(EXEC)_opt $(EXEC)_dbg *.o Makefile.depend

include Makefile.depend
