Revision 1450 trunk/contrib/Makefile

Makefile (revision 1450)
1
all: contribs
1
DESTDIR=..\build\dist
2
OBJDESTDIR=..\build\objects\contrib
3
all:
4
	$(MAKE) contrib-includes
5
	$(MAKE) contrib-libs
6
	$(MAKE) contrib-ad2csv
2 7

  
3
contribs: build-src build-gdbprintlib build-statslib build-qfclib build-ecolib
8
contrib-includes: contrib-dirs
9
	cd ecolib& $(MAKE) CONTRIB_INCLUDE=..\$(DESTDIR)\contrib\include includes
10
	cd gdbprintlib& $(MAKE) CONTRIB_INCLUDE=..\$(DESTDIR)\contrib\include includes
11
	cd qfclib& $(MAKE) CONTRIB_INCLUDE=..\$(DESTDIR)\contrib\include includes
12
	cd statslib& $(MAKE) CONTRIB_INCLUDE=..\$(DESTDIR)\contrib\include includes
13
	cd src& $(MAKE) CONTRIB_INCLUDE=..\$(DESTDIR)\contrib\include includes
4 14

  
5
build-gdbprintlib:
6
	pushd gdbprintlib& ..\..\utilities\make CXX=$(CXX) CXXFLAGS="$(CXXFLAGS)" ADMB_HOME="$(ADMB_HOME)" PREFIX_OBJ=$(PREFIX_OBJ)gdbprint-
7
	copy gdbprintlib\gdbprintlib.h $(ADMB_HOME)\contrib\include
15
contrib-dirs:
16
	IF NOT EXIST $(DESTDIR)\contrib md $(DESTDIR)\contrib
17
	IF NOT EXIST $(DESTDIR)\contrib\bin md $(DESTDIR)\contrib\bin
18
	IF NOT EXIST $(DESTDIR)\contrib\include md $(DESTDIR)\contrib\include
19
	IF NOT EXIST $(DESTDIR)\contrib\lib md $(DESTDIR)\contrib\lib
20
	IF NOT EXIST $(OBJDESTDIR) md $(OBJDESTDIR)
8 21

  
9
build-statslib:
10
	pushd statslib& ..\..\utilities\make CXX=$(CXX) CXXFLAGS="$(CXXFLAGS)" ADMB_HOME="$(ADMB_HOME)" PREFIX_OBJ=$(PREFIX_OBJ)statslib-
11
	copy statslib\statsLib.h $(ADMB_HOME)\contrib\include
22
contrib-libs: contrib-ecolib contrib-gdbprintlib contrib-qfclib contrib-statslib contrib-src
23
	IF EXIST $(DESTDIR)\contrib\lib\contrib.lib del $(DESTDIR)\contrib\lib\contrib.lib
24
	lib /OUT:$(DESTDIR)\contrib\lib\contrib.lib /NOLOGO /IGNORE:4006 $(OBJDESTDIR)\saflp-contrib*.obj
25
	IF EXIST $(DESTDIR)\contrib\lib\contribo.lib del $(DESTDIR)\contrib\lib\contribo.lib
26
	lib /OUT:$(DESTDIR)\contrib\lib\contribo.lib /NOLOGO /IGNORE:4006 $(OBJDESTDIR)\optlp-contrib*.obj
12 27

  
13
build-ecolib:
14
	pushd ecolib& ..\..\utilities\make CXX=$(CXX) CXXFLAGS="$(CXXFLAGS)" ADMB_HOME="$(ADMB_HOME)" PREFIX_OBJ=$(PREFIX_OBJ)ecolib-
15
	copy ecolib\ecolib.h $(ADMB_HOME)\contrib\include
28
contrib-ad2csv:
29
	pushd ad2csv& $(MAKE)
16 30

  
17
build-qfclib:
18
	pushd qfclib& ..\..\utilities\make CXX=$(CXX) CXXFLAGS="$(CXXFLAGS)" ADMB_HOME="$(ADMB_HOME)" PREFIX_OBJ=$(PREFIX_OBJ)qfclib-
19
	copy qfclib\qfclib.h $(ADMB_HOME)\contrib\include
31
contrib-ecolib:
32
	pushd ecolib& $(MAKE)
20 33

  
21
build-src:
22
	pushd src& ..\..\utilities\make CXX=$(CXX) CXXFLAGS="$(CXXFLAGS)" ADMB_HOME="$(ADMB_HOME)" PREFIX_OBJ=$(PREFIX_OBJ)src-
23
	copy src\contrib.h $(ADMB_HOME)\contrib\include
34
contrib-gdbprintlib:
35
	pushd gdbprintlib& $(MAKE)
24 36

  
37
contrib-qfclib:
38
	pushd qfclib& $(MAKE)
39

  
40
contrib-statslib:
41
	pushd statslib& $(MAKE)
42

  
43
contrib-src:
44
	pushd src& $(MAKE)
45

  
25 46
test:
26 47
	cd ecolib& $(MAKE) test
27 48
	cd qfclib& $(MAKE) test
28 49

  
29 50
clean:
30 51
	cd ecolib& $(MAKE) clean
52
	cd gdbprintlib& $(MAKE) clean
31 53
	cd qfclib& $(MAKE) clean
32 54
	cd statslib& $(MAKE) clean
55
	cd src& $(MAKE) clean
33 56
	cd ad2csv& $(MAKE) clean
57

  
58
copy:
59
	IF NOT EXIST $(DESTDIR)\contrib xcopy /I /E /Y ..\contrib $(DESTDIR)\contrib

Also available in: Unified diff