marci@764: #INCLUDEDIRS ?= -I.. -I. -I./{marci,jacint,alpar,klao,akos} marci@1017: #GLPKROOT = /usr/local/glpk-4.4 marci@1075: INCLUDEDIRS ?= -I/home/marci/boost -I/usr/local/cplex/cplex75/include -I../../{marci,alpar,klao,akos,athos} -I. -I../../.. -I../.. -I..# -I$(GLPKROOT)/include marci@764: #INCLUDEDIRS ?= -I../.. -I../.. -I../../{marci,jacint,alpar,klao,akos} -I/usr/local/glpk-4.4/include marci@764: CXXFLAGS = -g -O2 -W -Wall $(INCLUDEDIRS) -ansi -pedantic marci@1075: LDFLAGS = -lglpk#-lcplex -lm -lpthread -lilocplex -L/usr/local/cplex/cplex75/lib/i86_linux2_glibc2.2_gcc3.0/static_mt# -L$(GLPKROOT)/lib marci@764: marci@1153: BINARIES = magic_square max_flow_expression expression_test max_flow_by_lp# sample sample2 sample11 sample15 marci@764: marci@764: #include ../makefile marci@764: marci@764: # Hat, ez elismerem, hogy nagyon ronda, de mukodik minden altalam marci@764: # ismert rendszeren :-) (Misi) marci@764: ifdef GCCVER marci@764: CXX := g++-$(GCCVER) marci@764: else marci@764: CXX := $(shell type -p g++-3.3 || type -p g++-3.2 || type -p g++-3.0 || type -p g++-3 || echo g++) marci@764: endif marci@764: marci@764: ifdef DEBUG marci@764: CXXFLAGS += -DDEBUG marci@764: endif marci@764: marci@764: CC := $(CXX) marci@764: marci@764: marci@764: all: $(BINARIES) marci@764: marci@764: ################ marci@764: # Minden binarishoz egy sor, felsorolva, hogy mely object file-okbol marci@764: # all elo. marci@764: # Kiveve ha siman file.cc -> file esetrol van szo, amikor is nem kell marci@764: # irni semmit. marci@764: marci@764: #proba: proba.o seged.o marci@764: marci@764: ################ marci@764: marci@764: marci@764: # .depend dep depend: marci@764: # -$(CXX) $(CXXFLAGS) -M $(BINARIES:=.cc) > .depend marci@764: marci@764: #makefile: .depend marci@764: #sinclude .depend marci@764: #moert nem megy az eredeti /usr/bin/ld-vel? marci@764: marci@764: # %: %.o marci@764: # $(CXX) -o $@ $< $(LDFLAGS) marci@764: marci@764: # %.o: %.cc marci@764: # $(CXX) $(CXXFLAGS) -c $< marci@764: marci@764: %: %.cc marci@764: $(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) marci@764: marci@764: sample11prof: sample11prof.o marci@764: $(CXX) -pg -o sample11prof sample11prof.o -L$(GLPKROOT)/lib -lglpk marci@764: sample11prof.o: sample11.cc marci@764: $(CXX) -pg $(CXXFLAGS) -c -o sample11prof.o sample11.cc marci@764: marci@764: # sample.o: sample.cc marci@764: # $(CXX) $(CXXFLAGS) -c -o sample.o sample.cc marci@764: marci@764: # sample2: sample2.o marci@764: # $(CXX) -o sample2 sample2.o -L/usr/local/glpk-4.4/lib -lglpk marci@764: # sample2.o: sample2.cc marci@764: # $(CXX) $(CXXFLAGS) -c -o sample2.o sample2.cc marci@764: marci@764: marci@764: clean: marci@764: $(RM) *.o $(BINARIES) .depend marci@764: marci@764: .PHONY: all clean dep depend