Revision 1382 trunk/contrib/GNUmakefile

GNUmakefile (revision 1382)
1 1
.NOPARALLEL: all
2 2

  
3
ifeq ($(OS),Windows_NT)
4
  ifdef TERM
5
    ifeq ("$(TERM)","xterm")
6
      TERMINAL=cygwin
7
    endif
8
    ifeq ("$(TERM)","cygwin")
9
      TERMINAL=cygwin
10
    endif
11
  else
12
    TERMINAL=dos
13
    SHELL=cmd
14
  endif
15
endif
16

  
17
ifeq ($(TERMINAL),dos)
18
DISK=..\build\dist
19
PATH:=$(PATH):..\..\utilities\mingw\bin
20
else
21
DISK=../build/dist
22
endif
23

  
24 3
all: build-gdbprintlib build-statslib build-ecolib build-qfclib build-src
25
ifeq ($(TERMINAL),dos)
4
ifeq ($(SHELL),sh.exe)
26 5
	$(AR) -rs $(DISK)\contrib\lib\libcontrib.a ..\build\objects\dist\saflp-contrib-*.obj
27 6
	$(AR) -rs $(DISK)\contrib\lib\libcontribo.a ..\build\objects\dist\optlp-contrib-*.obj
28 7
else
......
33 12
ad2csv: build-ad2csv
34 13

  
35 14
build-gdbprintlib:
36
ifeq ($(TERMINAL),dos)
15
ifeq ($(SHELL),sh.exe)
37 16
	$(MAKE) --directory=gdbprintlib CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_SAFE_CONTRIB)" PREFIX_OBJ=..\..\build\objects\dist\saflp-contrib-gdbprintlib-
38 17
	$(MAKE) --directory=gdbprintlib CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_OPT_CONTRIB)" PREFIX_OBJ=..\..\build\objects\dist\optlp-contrib-gdbprintlib-
39 18
	copy gdbprintlib\gdbprintlib.h $(DISK)\contrib\include
......
44 23
endif
45 24

  
46 25
build-statslib:
47
ifeq ($(TERMINAL),dos)
26
ifeq ($(SHELL),sh.exe)
48 27
	$(MAKE) --directory=statslib CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_SAFE_CONTRIB)" PREFIX_OBJ=..\..\build\objects\dist\saflp-contrib-statslib-
49 28
	$(MAKE) --directory=statslib CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_OPT_CONTRIB)" PREFIX_OBJ=..\..\build\objects\dist\optlp-contrib-statslib-
50 29
	copy statslib\statsLib.h $(DISK)\contrib\include
......
55 34
endif
56 35

  
57 36
build-ecolib:
58
ifeq ($(TERMINAL),dos)
37
ifeq ($(SHELL),sh.exe)
59 38
	$(MAKE) --directory=ecolib CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_SAFE_CONTRIB)" PREFIX_OBJ=..\..\build\objects\dist\saflp-contrib-ecolib-
60 39
	$(MAKE) --directory=ecolib CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_OPT_CONTRIB)" PREFIX_OBJ=..\..\build\objects\dist\optlp-contrib-ecolib-
61 40
	copy ecolib\ecolib.h $(DISK)\contrib\include
......
66 45
endif
67 46

  
68 47
build-qfclib:
69
ifeq ($(TERMINAL),dos)
48
ifeq ($(SHELL),sh.exe)
70 49
	$(MAKE) --directory=qfclib CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_SAFE_CONTRIB)" PREFIX_OBJ=..\..\build\objects\dist\saflp-contrib-qfclib-
71 50
	$(MAKE) --directory=qfclib CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_OPT_CONTRIB)" PREFIX_OBJ=..\..\build\objects\dist\optlp-contrib-qfclib-
72 51
	copy qfclib\qfclib.h $(DISK)\contrib\include
......
77 56
endif
78 57

  
79 58
build-ad2csv:
80
ifeq ($(TERMINAL),dos)
59
ifeq ($(SHELL),sh.exe)
81 60
	$(MAKE) --directory=ad2csv --file=Makefile
82 61
else
83 62
	$(MAKE) --directory=ad2csv
......
87 66
	$(MAKE) --directory=admb2r ADMB_HOME="$(ADMB_HOME)" gcc
88 67

  
89 68
build-src:
90
ifeq ($(TERMINAL),dos)
91
	$(MAKE) --directory=src CXX=$(CXX) CXXFLAGS="-DOPT_LIB $(CXXFLAGS) -I..\..\build\dist\include" PREFIX_OBJ=..\..\build\objects\dist\optlp-contrib-
92
	$(MAKE) --directory=src CXX=$(CXX) CXXFLAGS="-DSAFE_ALL $(CXXFLAGS) -I..\..\build\dist\include" PREFIX_OBJ=..\..\build\objects\dist\saflp-contrib-
69
ifeq ($(SHELL),sh.exe)
70
	$(MAKE) --directory=src CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_OPT_CONTRIB)" PREFIX_OBJ=..\..\build\objects\dist\optlp-contrib-
71
	$(MAKE) --directory=src CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_SAFE_CONTRIB)" PREFIX_OBJ=..\..\build\objects\dist\saflp-contrib-
93 72
	copy src\contrib.h $(DISK)\contrib\include
94 73
else
95
	$(MAKE) --directory=src CXX=$(CXX) CXXFLAGS="-DOPT_LIB $(CXXFLAGS) -I../../build/dist/include" PREFIX_OBJ=../../build/objects/dist/optlp-contrib-
96
	$(MAKE) --directory=src CXX=$(CXX) CXXFLAGS="-DSAFE_ALL $(CXXFLAGS) -I../../build/dist/include" PREFIX_OBJ=../../build/objects/dist/saflp-contrib-
74
	$(MAKE) --directory=src CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_OPT_CONTRIB)" PREFIX_OBJ=../../build/objects/dist/optlp-contrib-
75
	$(MAKE) --directory=src CXX=$(CXX) CXXFLAGS="$(CXXFLAGS_SAFE_CONTRIB)" PREFIX_OBJ=../../build/objects/dist/saflp-contrib-
97 76
	cp src/contrib.h $(DISK)/contrib/include
98 77
endif
99 78

  
......
109 88
	@$(MAKE) --directory=ecolib clean
110 89
	@$(MAKE) --directory=qfclib clean
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff