src/work/marci/lp/makefile
author marci
Tue, 31 Aug 2004 11:26:59 +0000
changeset 775 e46a1f0623a0
child 1014 aae850a2394d
permissions -rw-r--r--
ResGraphWrapper<Graph> is done, so does dimacs.h.
marci@764
     1
#INCLUDEDIRS ?= -I.. -I. -I./{marci,jacint,alpar,klao,akos}
marci@764
     2
GLPKROOT = /usr/local/glpk-4.4
marci@764
     3
INCLUDEDIRS ?= -I../../{marci,alpar,klao,akos,athos} -I. -I../../.. -I../.. -I.. -I$(GLPKROOT)/include
marci@764
     4
#INCLUDEDIRS ?= -I../.. -I../.. -I../../{marci,jacint,alpar,klao,akos} -I/usr/local/glpk-4.4/include
marci@764
     5
CXXFLAGS = -g -O2 -W -Wall $(INCLUDEDIRS) -ansi -pedantic
marci@764
     6
LDFLAGS  = -L$(GLPKROOT)/lib -lglpk
marci@764
     7
marci@764
     8
BINARIES = max_flow_by_lp sample sample2 sample11 sample15
marci@764
     9
marci@764
    10
#include ../makefile
marci@764
    11
marci@764
    12
# Hat, ez elismerem, hogy nagyon ronda, de mukodik minden altalam
marci@764
    13
# ismert rendszeren :-)  (Misi)
marci@764
    14
ifdef GCCVER
marci@764
    15
CXX := g++-$(GCCVER)
marci@764
    16
else
marci@764
    17
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
    18
endif
marci@764
    19
marci@764
    20
ifdef DEBUG
marci@764
    21
CXXFLAGS += -DDEBUG
marci@764
    22
endif
marci@764
    23
marci@764
    24
CC := $(CXX)
marci@764
    25
marci@764
    26
marci@764
    27
all: $(BINARIES)
marci@764
    28
marci@764
    29
################
marci@764
    30
# Minden binarishoz egy sor, felsorolva, hogy mely object file-okbol
marci@764
    31
# all elo.
marci@764
    32
# Kiveve ha siman file.cc -> file  esetrol van szo, amikor is nem kell
marci@764
    33
# irni semmit.
marci@764
    34
marci@764
    35
#proba: proba.o seged.o
marci@764
    36
marci@764
    37
################
marci@764
    38
marci@764
    39
marci@764
    40
# .depend dep depend:
marci@764
    41
# 	-$(CXX) $(CXXFLAGS) -M $(BINARIES:=.cc) > .depend
marci@764
    42
marci@764
    43
#makefile: .depend
marci@764
    44
#sinclude .depend
marci@764
    45
#moert nem megy az eredeti /usr/bin/ld-vel?
marci@764
    46
marci@764
    47
# %: %.o
marci@764
    48
# 	$(CXX) -o $@ $< $(LDFLAGS)
marci@764
    49
marci@764
    50
# %.o: %.cc
marci@764
    51
# 	$(CXX) $(CXXFLAGS) -c $<
marci@764
    52
marci@764
    53
%: %.cc
marci@764
    54
	$(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS)
marci@764
    55
marci@764
    56
sample11prof: sample11prof.o
marci@764
    57
	 $(CXX) -pg -o sample11prof sample11prof.o -L$(GLPKROOT)/lib -lglpk
marci@764
    58
sample11prof.o: sample11.cc
marci@764
    59
	$(CXX) -pg $(CXXFLAGS) -c -o sample11prof.o sample11.cc
marci@764
    60
marci@764
    61
# sample.o: sample.cc
marci@764
    62
# 	$(CXX) $(CXXFLAGS) -c -o sample.o sample.cc
marci@764
    63
marci@764
    64
# sample2: sample2.o
marci@764
    65
# 	$(CXX) -o sample2 sample2.o -L/usr/local/glpk-4.4/lib -lglpk
marci@764
    66
# sample2.o: sample2.cc
marci@764
    67
# 	$(CXX) $(CXXFLAGS) -c -o sample2.o sample2.cc
marci@764
    68
marci@764
    69
marci@764
    70
clean:
marci@764
    71
	$(RM) *.o $(BINARIES) .depend
marci@764
    72
marci@764
    73
.PHONY: all clean dep depend