# -*- mode: makefile; -*-
# 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 lpzrobots simulations
# Author:     Georg Martius  <georg.martius at web.de>
# Date:       Oct 2009




 




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=
INC    += -I.
BASELIBS = $(shell ode_robots-config $(CFGOPTS) --static --libs) $(shell selforg-config $(CFGOPTS) --static --libs) 
BASELIBSSHARED := $(shell ode_robots-config $(CFGOPTS) --libs) $(shell selforg-config $(CFGOPTS) --libs)













LIBS  += $(BASELIBS) $(ADDITIONAL_LIBS)

INC   += -I.

CXX = g++
CPPFLAGS = -Wall -pipe -Wno-deprecated $(INC) $(shell selforg-config $(CFGOPTS) --cflags) \
  $(shell ode_robots-config $(CFGOPTS) --intern --cflags) 

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

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



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

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

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



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

-include Makefile.depend
