Revision 1385 trunk/contrib/GNUmakefile

GNUmakefile (revision 1385)
1 1
.NOPARALLEL: all
2
DISK=$(DIST)
3 2

  
3
ifeq ($(SHELL),sh.exe)
4
  PREFIX_DIR=..\..\build\objects\dist
5
  PREFIX_DIR:=$(addsuffix \,$(PREFIX_DIR))
6
  DISK=$(addsuffix \,$(DIST))
7
else
8
  PREFIX_DIR=../../build/objects/dist
9
  PREFIX_DIR:=$(addsuffix \,$(PREFIX_DIR))
10
  DISK=$(addsuffix /,$(DIST))
11
endif
12

  
4 13
all: build-gdbprintlib build-statslib build-ecolib build-qfclib build-src
5 14
ifeq ($(SHELL),sh.exe)
6
	$(AR) -rs $(DISK)\contrib\lib\libcontrib.a ..\build\objects\dist\saflp-contrib-*.obj
7
	$(AR) -rs $(DISK)\contrib\lib\libcontribo.a ..\build\objects\dist\optlp-contrib-*.obj
15
	$(AR) -rs $(DISK)\contrib\lib\libcontrib.a $(PREFIX_DIR)saflp-contrib-*.obj
16
	$(AR) -rs $(DISK)\contrib\lib\libcontribo.a $(PREFIX_DIR)optlp-contrib-*.obj
8 17
else
9
	$(AR) -rs $(DISK)/contrib/lib/libcontrib.a ../build/objects/dist/saflp-contrib-*.obj
10
	$(AR) -rs $(DISK)/contrib/lib/libcontribo.a ../build/objects/dist/optlp-contrib-*.obj
18
	$(AR) -rs $(DISK)/contrib/lib/libcontrib.a $(PREFIX_DIR)saflp-contrib-*.obj
19
	$(AR) -rs $(DISK)/contrib/lib/libcontribo.a $(PREFIX_DIR)optlp-contrib-*.obj
11 20
endif
12 21

  
13 22
ad2csv: build-ad2csv
14 23

  
15 24
build-gdbprintlib:
25
	$(MAKE) --directory=gdbprintlib PREFIX_OBJ=$(PREFIX_DIR)saflp-contrib-gdbprintlib-
26
	$(MAKE) --directory=gdbprintlib PREFIX_OBJ=$(PREFIX_DIR)optlp-contrib-gdbprintlib-
16 27
ifeq ($(SHELL),sh.exe)
17
	$(MAKE) --directory=gdbprintlib CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_SAFE_CONTRIB)" PREFIX_OBJ=..\..\build\objects\dist\saflp-contrib-gdbprintlib-
18
	$(MAKE) --directory=gdbprintlib CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_OPT_CONTRIB)" PREFIX_OBJ=..\..\build\objects\dist\optlp-contrib-gdbprintlib-
19 28
	copy gdbprintlib\gdbprintlib.h $(DISK)\contrib\include
20 29
else
21
	$(MAKE) --directory=gdbprintlib CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_SAFE_CONTRIB)" PREFIX_OBJ=../../build/objects/dist/saflp-contrib-gdbprintlib-
22
	$(MAKE) --directory=gdbprintlib CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_OPT_CONTRIB)" PREFIX_OBJ=../../build/objects/dist/optlp-contrib-gdbprintlib-
23 30
	cp gdbprintlib/gdbprintlib.h $(DISK)/contrib/include
24 31
endif
25 32

  
......
67 74
	$(MAKE) --directory=admb2r ADMB_HOME="$(ADMB_HOME)" gcc
68 75

  
69 76
build-src:
77
	$(MAKE) --directory=src PREFIX_OBJ=$(PREFIX_DIR)optlp-contrib-
78
	$(MAKE) --directory=src PREFIX_OBJ=$(PREFIX_DIR)saflp-contrib-
70 79
ifeq ($(SHELL),sh.exe)
71
	$(MAKE) --directory=src CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_OPT_CONTRIB)" PREFIX_OBJ=..\..\build\objects\dist\optlp-contrib-
72
	$(MAKE) --directory=src CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_SAFE_CONTRIB)" PREFIX_OBJ=..\..\build\objects\dist\saflp-contrib-
73 80
	copy src\contrib.h $(DISK)\contrib\include
74 81
else
75
	$(MAKE) --directory=src CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_OPT_CONTRIB)" PREFIX_OBJ=../../build/objects/dist/optlp-contrib-
76
	$(MAKE) --directory=src CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_SAFE_CONTRIB)" PREFIX_OBJ=../../build/objects/dist/saflp-contrib-
77 82
	cp src/contrib.h $(DISK)/contrib/include
78 83
endif
79 84

  

Also available in: Unified diff