Revision 1064 trunk/src/GNUmakefile

GNUmakefile (revision 1064)
25 25
CXXFLAGS:=-Wall -D__GNUDOS__ -Dlinux -D__SPDLL__ -DUSE_LAPLACE $(CXXFLAGS)
26 26
endif
27 27

  
28
ifdef BUILD_SHARED_LIBRARY
29
CXXFLAGS:=-fPIC $(CXXFLAGS)
30
endif
31

  
28 32
ifdef DEBUG
29 33
CXXFLAGS:=-g $(CXXFLAGS)
30 34
else
......
35 39
ifeq ($(SHELL),sh.exe)
36 40
	pushd $(DISK) & cscript ..\..\scripts\create-admb-shortcut.vbs & popd
37 41
endif
42
ifndef BUILD_SHARED_LIBRARY
43
	$(MAKE) CXXFLAGS="$(CXXFLAGS)" ADMB_HOME="$(PWD)/${DISK}" --directory=../contrib build-ad2csv
44
endif
38 45
	@echo ADMB build completed.
39 46
	@echo For installation, check README.txt.
40 47

  
48
shared: libobjects
49
	g++ -shared -o${DISK}/lib/libadmb.so ../build/objects/dist/saflp-linad99-*.obj ../build/objects/dist/saflp-df1b2-separable-*.obj ../build/objects/dist/optlp-nh99-*.obj ../build/objects/dist/optlp-tools99-*.obj ../build/objects/dist/saflp-contrib-*.obj
50
	g++ -shared -o${DISK}/lib/libadmbo.so ../build/objects/dist/optlp-*.obj
51
	$(MAKE) CXXFLAGS="$(CXXFLAGS)" ADMB_HOME="$(PWD)/${DISK}" --directory=../contrib build-ad2csv
52
	@echo ADMB shared build completed.
53
	@echo For installation, check README.txt.
54

  
41 55
revision:
42 56
	-svnversion .. > ../REVISION
43 57
dist:
......
219 233
	cp df1b2-separable/seddf1b* df1b2-separable/sedf1b2* ${DISK}/bin
220 234
	cp ../scripts/admb/admb ${DISK}/bin
221 235
	cp ../scripts/admb/adcomp ${DISK}/bin
236
ifdef BUILD_SHARED_LIBRARY
237
	cp ../scripts/admb/adlink-shared ${DISK}/bin/adlink
238
else
222 239
	cp ../scripts/admb/adlink ${DISK}/bin
240
endif
223 241
	rm -f ${DISK}/bin/admb-cfg.sh
224 242
	echo "CXX=$(CXX)" > ${DISK}/bin/admb-cfg.sh
225 243
	$(MAKE) --directory=df1b2-separable CC=$(CC) DISKDIR=../${DISK} bins

Also available in: Unified diff