Changeset 22 for branches


Ignore:
Timestamp:
Sep 17, 2002 11:20:32 PM (17 years ago)
Author:
ladanyi
Message:

Fixing further examples and Makefiles for devel-1

Location:
branches/devel-1
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/devel-1/Makefile

    r21 r22  
    1 # Static or shared libraries should be built (STATIC or SHARED)?
    2 LibType := SHARED
     1# Look at and if necessary edit the following files:
     2# - ../Makefiles/Makefile.location
     3# - Makefile.Osi
     4# - Osi*/Makefile for the libs you have specified above
    35
    4 # Select optimization (-O or -g). -O will be automatically bumped up to the
    5 # highest level of optimization the compiler supports. If want something in
    6 # between then specify the exact level you want, e.g., -O1 or -O2
    7 OptLevel := -g
    8 OptLevel := -O2
     6###############################################################################
    97
    10 ifeq ($(OptLevel),-g)
    11     CXXFLAGS += -DCLP_DEBUG
    12 endif
    13 
    14 LIBNAME := Clp
    15 LIBSRC :=
    16 LIBSRC += ClpDualRowDantzig.cpp
    17 LIBSRC += ClpDualRowPivot.cpp
    18 LIBSRC += ClpDualRowSteepest.cpp
    19 LIBSRC += ClpFactorization.cpp
    20 #LIBSRC += ClpMalloc.cpp
    21 LIBSRC += ClpMatrixBase.cpp
    22 LIBSRC += ClpMessage.cpp
    23 LIBSRC += ClpModel.cpp
    24 LIBSRC += ClpNonLinearCost.cpp
    25 LIBSRC += ClpPackedMatrix.cpp
    26 LIBSRC += ClpPrimalColumnDantzig.cpp
    27 LIBSRC += ClpPrimalColumnPivot.cpp
    28 LIBSRC += ClpPrimalColumnSteepest.cpp
    29 LIBSRC += ClpSimplex.cpp
    30 LIBSRC += ClpSimplexDual.cpp
    31 LIBSRC += ClpSimplexPrimal.cpp
    32 
    33 export CoinDir = $(shell cd ..; pwd)
    34 ##############################################################################
    35 # You should not need to edit below this line.
    36 ##############################################################################
    37 # The location of the customized Makefiles
    38 export CoinDir = $(shell cd ..; pwd)
     8export CoinDir := $(shell cd ..; pwd)
    399export MakefileDir := $(CoinDir)/Makefiles
    4010include ${MakefileDir}/Makefile.coin
    4111include ${MakefileDir}/Makefile.location
    42 
    43 export ExtraIncDir  := ${CoinIncDir} ${zlibIncDir} ${bzlibIncDir}
    44 export ExtraLibDir  := ${CoinLibDir} ${zlibLibDir} ${bzlibLibDir}
    45 export ExtraLibName := ${CoinLibName} ${zlibLibName} ${bzlibLibName}
    46 export ExtraDefine  := ${CoinDefine} ${zlibDefine} ${bzlibDefine}
    47 
    48 export LibType OptLevel LIBNAME LIBSRC
    4912
    5013###############################################################################
     
    5215.DELETE_ON_ERROR:
    5316
    54 .PHONY: default install libClp library clean doc
     17.PHONY: default install clean library unitTest libdepend libClp doc
    5518
    5619default: install
    5720
    58 unitTest : install
     21libdepend:
     22        (cd $(CoinDir)/Coin && $(MAKE) install)
     23
     24install library: libdepend
     25        ${MAKE} -f Makefile.Clp $@
     26
     27libClp: libdepend
     28        ${MAKE} -f Makefile.Clp library
     29
     30unitTest:
    5931        (cd Test && ${MAKE} unitTest)
    6032
    61 install clean doc: % :
    62         $(MAKE) -f ${MakefileDir}/Makefile.lib $*
    63 
    64 libClp:
    65         (cd $(CoinDir)/Coin && $(MAKE))
    66         $(MAKE) -f ${MakefileDir}/Makefile.lib library
     33clean:
     34        rm -rf Junk
     35        @rm -rf $(DEPDIR)
     36        @rm -rf $(TARGETDIR)
  • branches/devel-1/Test/Makefile

    r19 r22  
    1 # Select optimization (-O or -g). -O will be automatically bumped up to the
    2 # highest level of optimization the compiler supports. If want something in
    3 # between then specify the exact level you want, e.g., -O1 or -O2
    4 OptLevel := -g
     1# Look at and if necessary edit the following files:
     2# - ../Makefiles/Makefile.location
     3# - Makefile.Osi
     4# - Osi*/Makefile for the libs you have specified above
    55
    6 ##############################################################################
    7 # You should not need to edit below this line.
    8 ##############################################################################
    9 # The location of the customized Makefiles
    10 # also inherited from the parent Makefile
    11 export CoinDir = $(shell cd ../..; pwd)
     6###############################################################################
     7
     8export CoinDir := $(shell cd ../..; pwd)
    129export MakefileDir := $(CoinDir)/Makefiles
    1310include ${MakefileDir}/Makefile.coin
    1411include ${MakefileDir}/Makefile.location
    15 
    16 IncDir := ${ClpIncDir} ${CoinIncDir} ${bzlibIncDir} ${zlibIncDir}
    17 LibDir := ${ClpLibDir} ${CoinLibDir} ${bzlibLibDir} ${zlibLibDir}
    18 LibName := ${ClpLibName} ${CoinLibName} ${bzlibLibName} ${zlibLibName}
    19 Define := ${ClpDefine} ${CoinDefine} ${bzlibDefine} ${zlibDefine}
    20 
    21 ##############################################################################
    22 # You should not need to edit below this line.
    23 ##############################################################################
    24 
    25 CXXFLAGS += $(OPTFLAG)
    26 ifeq ($(OptLevel),-g)
    27     CXXFLAGS += -DOSI_DEBUG
    28 endif
    29 
    30 TESTSRC := ClpMain.cpp
    31 TESTSRC += unitTest.cpp
    32 
    33 ###############################################################################
    34 
    35 space:= $(empty) $(empty)
    36 OptVersion := $(subst $(space),_,$(OptLevel))
    37 
    38 TARGETDIR := $(UNAME)$(OptVersion)
    39 DEPDIR := dep
    40 
    41 VPATH := . : include : Junk : ${TARGETDIR} : ${DEPDIR}
    42 
    43 #########################################################################
    44 
    45 CXXFLAGS += $(addprefix -I,${IncDir})
    46 CXXFLAGS += $(addprefix -D,${Define})
    47 
    48 LIBDIRS := ${LibDir}
    49 LIBS    := ${LibName}
    50 
    51 LDFLAGS := $(addprefix -L,$(LIBDIRS))
    52 LDFLAGS += $(call ifprefix,$(SHLINKPREFIX),$(LIBDIRS))
    53 LDFLAGS += $(patsubst lib%,-l%,$(basename $(LIBS)))
    54 
    55 ifeq ($(findstring Linux,${UNAME}),Linux)
    56         CXXFLAGS +=     -DREADLINE
    57         LDFLAGS += -lhistory -lreadline -ltermcap
    58 endif
    59 
    60 ###############################################################################
    61 
    62 TESTOBJ := $(addprefix $(TARGETDIR)/, $(TESTSRC:.cpp=.o))
    63 TESTDEP := $(addprefix $(DEPDIR)/, $(TESTSRC:.cpp=.d))
    64 
    65 ###############################################################################
    66 # This one must be right before the rules
    67 
    68 include ${MakefileDir}/Makefile.rules
    6912
    7013###############################################################################
     
    7215.DELETE_ON_ERROR:
    7316
    74 .PHONY: default clean doc unitTest libdepend
     17.PHONY: default clean unitTest libdepend
    7518
    7619default: unitTest
    77 
    78 ###############################################################################
    79 
    80 unitTest: $(TARGETDIR)/clp
    8120
    8221libdepend :
    8322        (cd .. && ${MAKE} install)
    8423
    85 $(TARGETDIR)/clp : libdepend $(TESTOBJ)
    86         @rm -rf Junk
    87         @echo ""
    88         @echo Creating clp
    89         @mkdir -p $(TARGETDIR)
    90         @rm -f $@
    91         $(CXX) $(CXXFLAGS) -o $@ $(TESTOBJ) $(LDFLAGS) $(SYSLD) -lm
    92         ${CP} $@ ..
     24unitTest: libdepend
     25        ${MAKE} -f Makefile.test $*
    9326
    94 ###############################################################################
    95 
    96 doc:
    97         doxygen $(MakefileDir)/doxygen.conf
    98 
    99 clean :
     27clean:
    10028        rm -rf Junk
    101         @rm -rf $(DEPDIR)
    102         @rm -rf $(TARGETDIR)
    103 
    104 ###############################################################################
    105 
    106 %::
    107         @mkdir -p Junk
    108         touch Junk/$(notdir $@)
    109 
    110 ###############################################################################
    111 
    112 -include $(TESTDEP)
     29        rm -rf dep
     30        rm -rf $(UNAME)*
Note: See TracChangeset for help on using the changeset viewer.