Revision 1085

trunk/contrib/GNUmakefile (revision 1085)
1 1
.NOPARALLEL: all
2 2

  
3
ifneq ($(SHELL),sh.exe)
4
DISK=../build/dist
5
else
6
DISK=..\build\dist
7
  ifndef MINGW_HOME
8
    PATH:=..\..\utilities\mingw\bin:$(PATH)
9
    AR=..\utilities\mingw\bin\ar
10
    MAKE=..\utilities\make
3
ifeq ($(OS),Windows_NT)
4
  ifeq ($(TERM),cygwin)
5
    TERMINAL=cygwin
6
  else
7
    TERMINAL=dos
11 8
  endif
12 9
endif
13 10

  
14
ifndef LIBPATH
11
ifeq ($(TERMINAL),dos)
12
DISK=..\build\dist
13
PATH:=$(PATH):..\..\utilities\mingw\bin
14
LIBPATH=..\..\build\objects\dist
15
else
16
DISK=../build/dist
15 17
LIBPATH=../../build/objects/dist
16 18
endif
17 19

  
18 20
all: build-gdbprintlib build-statslib build-ecolib build-qfclib build-src
19
ifneq ($(SHELL),sh.exe)
21
ifeq ($(TERMINAL),dos)
22
	$(AR) -rs $(DISK)\contrib\lib\libcontrib.a ..\build\objects\dist\saflp-contrib-*.obj
23
	$(AR) -rs $(DISK)\contrib\lib\libcontribo.a ..\build\objects\dist\optlp-contrib-*.obj
24
else
20 25
	$(AR) -rs $(DISK)/contrib/lib/libcontrib.a ../build/objects/dist/saflp-contrib-*.obj
21 26
	$(AR) -rs $(DISK)/contrib/lib/libcontribo.a ../build/objects/dist/optlp-contrib-*.obj
22
else
23
	$(AR) -rs $(DISK)\contrib\lib\libcontrib.a ..\build\objects\dist\saflp-contrib-*.obj
24
	$(AR) -rs $(DISK)\contrib\lib\libcontribo.a ..\build\objects\dist\optlp-contrib-*.obj
25 27
endif
26 28

  
27 29
ad2csv: build-ad2csv
28 30

  
29 31
build-gdbprintlib:
32
ifeq ($(TERMINAL),dos)
33
	$(MAKE) --directory=gdbprintlib CXX=$(CXX) CXXFLAGS="-DSAFE_ALL $(CXXFLAGS) -I\"$(ADMB_HOME)\include\"" PREFIX_OBJ=$(LIBPATH)\saflp-contrib-gdbprintlib-
34
	$(MAKE) --directory=gdbprintlib CXX=$(CXX) CXXFLAGS="-DOPT_LIB $(CXXFLAGS) -I\"$(ADMB_HOME)\include\"" PREFIX_OBJ=$(LIBPATH)\optlp-contrib-gdbprintlib-
35
	copy gdbprintlib\gdbprintlib.h $(DISK)\contrib\include
36
else
30 37
	$(MAKE) --directory=gdbprintlib CXX=$(CXX) CXXFLAGS="-DSAFE_ALL $(CXXFLAGS) -I\"$(ADMB_HOME)/include\"" PREFIX_OBJ=$(LIBPATH)/saflp-contrib-gdbprintlib-
31 38
	$(MAKE) --directory=gdbprintlib CXX=$(CXX) CXXFLAGS="-DOPT_LIB $(CXXFLAGS) -I\"$(ADMB_HOME)/include\"" PREFIX_OBJ=$(LIBPATH)/optlp-contrib-gdbprintlib-
32
ifeq ($(SHELL),sh.exe)
33
	copy gdbprintlib\gdbprintlib.h $(DISK)\contrib\include
34
else
35 39
	cp gdbprintlib/gdbprintlib.h $(DISK)/contrib/include
36 40
endif
37 41

  
38 42
build-statslib:
43
ifeq ($(TERMINAL),dos)
44
	$(MAKE) --directory=statslib CXX=$(CXX) CXXFLAGS="-DSAFE_ALL $(CXXFLAGS) -I\"$(ADMB_HOME)\include\"" PREFIX_OBJ=$(LIBPATH)\saflp-contrib-statslib-
45
	$(MAKE) --directory=statslib CXX=$(CXX) CXXFLAGS="-DOPT_LIB $(CXXFLAGS) -I\"$(ADMB_HOME)\include\"" PREFIX_OBJ=$(LIBPATH)\optlp-contrib-statslib-
46
	copy statslib\statsLib.h $(DISK)\contrib\include
47
else
39 48
	$(MAKE) --directory=statslib CXX=$(CXX) CXXFLAGS="-DSAFE_ALL $(CXXFLAGS) -I\"$(ADMB_HOME)/include\"" PREFIX_OBJ=$(LIBPATH)/saflp-contrib-statslib-
40 49
	$(MAKE) --directory=statslib CXX=$(CXX) CXXFLAGS="-DOPT_LIB $(CXXFLAGS) -I\"$(ADMB_HOME)/include\"" PREFIX_OBJ=$(LIBPATH)/optlp-contrib-statslib-
41
ifeq ($(SHELL),sh.exe)
42
	copy statslib\statsLib.h $(DISK)\contrib\include
43
else
44 50
	cp statslib/statsLib.h $(DISK)/contrib/include
45 51
endif
46 52

  
47 53
build-ecolib:
54
ifeq ($(TERMINAL),dos)
55
	$(MAKE) --directory=ecolib CXX=$(CXX) CXXFLAGS="-DSAFE_ALL $(CXXFLAGS) -I\"$(ADMB_HOME)\include\"" PREFIX_OBJ=$(LIBPATH)\saflp-contrib-ecolib-
56
	$(MAKE) --directory=ecolib CXX=$(CXX) CXXFLAGS="-DOPT_LIB $(CXXFLAGS) -I\"$(ADMB_HOME)\include\"" PREFIX_OBJ=$(LIBPATH)\optlp-contrib-ecolib-
57
	copy ecolib\ecolib.h $(DISK)\contrib\include
58
else
48 59
	$(MAKE) --directory=ecolib CXX=$(CXX) CXXFLAGS="-DSAFE_ALL $(CXXFLAGS) -I\"$(ADMB_HOME)/include\"" PREFIX_OBJ=$(LIBPATH)/saflp-contrib-ecolib-
49 60
	$(MAKE) --directory=ecolib CXX=$(CXX) CXXFLAGS="-DOPT_LIB $(CXXFLAGS) -I\"$(ADMB_HOME)/include\"" PREFIX_OBJ=$(LIBPATH)/optlp-contrib-ecolib-
50
ifeq ($(SHELL),sh.exe)
51
	copy ecolib\ecolib.h $(DISK)\contrib\include
52
else
53 61
	cp ecolib/ecolib.h $(DISK)/contrib/include
54 62
endif
55 63

  
56 64
build-qfclib:
65
ifeq ($(TERMINAL),dos)
66
	$(MAKE) --directory=qfclib CXX=$(CXX) CXXFLAGS="-DSAFE_ALL $(CXXFLAGS) -I\"$(ADMB_HOME)\include\"" PREFIX_OBJ=$(LIBPATH)\saflp-contrib-qfclib-
67
	$(MAKE) --directory=qfclib CXX=$(CXX) CXXFLAGS="-DOPT_LIB $(CXXFLAGS) -I\"$(ADMB_HOME)\include\"" PREFIX_OBJ=$(LIBPATH)\optlp-contrib-qfclib-
68
	copy qfclib\qfclib.h $(DISK)\contrib\include
69
else
57 70
	$(MAKE) --directory=qfclib CXX=$(CXX) CXXFLAGS="-DSAFE_ALL $(CXXFLAGS) -I\"$(ADMB_HOME)/include\"" PREFIX_OBJ=$(LIBPATH)/saflp-contrib-qfclib-
58 71
	$(MAKE) --directory=qfclib CXX=$(CXX) CXXFLAGS="-DOPT_LIB $(CXXFLAGS) -I\"$(ADMB_HOME)/include\"" PREFIX_OBJ=$(LIBPATH)/optlp-contrib-qfclib-
59
ifeq ($(SHELL),sh.exe)
60
	copy qfclib\qfclib.h $(DISK)\contrib\include
61
else
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff