Revision 1079

trunk/src/GNUmakefile (revision 1079)
22 22
ifeq ($(CXX),CC)
23 23
CXXFLAGS:=-D__GNUDOS__ -Dlinux -D__SPDLL__ -DUSE_LAPLACE $(CXXFLAGS)
24 24
else
25
CXXFLAGS:=-Wall -D__GNUDOS__ -Dlinux -D__SPDLL__ -DUSE_LAPLACE $(CXXFLAGS)
25
CXXFLAGS:=-Wall -D__GNUDOS__ -Dlinux -D__SPDLL__ -DUSE_LAPLACE -I../build/dist/include $(CXXFLAGS)
26 26
endif
27 27

  
28 28
ifdef BUILD_SHARED_LIBRARY
......
35 35
CXXFLAGS:=-O3 $(CXXFLAGS)
36 36
endif
37 37

  
38
include df1b2-separable/objects.lst
39
OPTLP_DF1B2_SEPARABLE_OBJS=$(sort $(addprefix ../build/objects/dist/optlp-df1b2-separable-,$(OBJ0)))
40
SAFLP_DF1B2_SEPARABLE_OBJS=$(sort $(addprefix ../build/objects/dist/saflp-df1b2-separable-,$(OBJ0)))
41

  
42
include linad99/objects.lst
43
OPTLP_LINAD99_OBJS=$(sort $(addprefix ../build/objects/dist/optlp-linad99-,$(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4)))
44
SAFLP_LINAD99_OBJS=$(sort $(addprefix ../build/objects/dist/saflp-linad99-,$(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4)))
45

  
46
include nh99/objects.lst
47
OPTLP_NH99_OBJS=$(sort $(addprefix ../build/objects/dist/optlp-nh99-,$(OBJ6)))
48
SAFLP_NH99_OBJS=$(sort $(addprefix ../build/objects/dist/saflp-nh99-,$(OBJ6)))
49

  
50
include tools99/objects.lst
51
OPTLP_TOOLS99_OBJS=$(sort $(addprefix ../build/objects/dist/optlp-tools99-,$(OBJ7)))
52
SAFLP_TOOLS99_OBJS=$(sort $(addprefix ../build/objects/dist/saflp-tools99-,$(OBJ7)))
53

  
38 54
all: revision dist contrib
39 55
ifeq ($(SHELL),sh.exe)
40 56
	pushd $(DISK) & cscript ..\..\scripts\create-admb-shortcut.vbs & popd
......
45 61
	@echo ADMB build completed.
46 62
	@echo For installation, check README.txt.
47 63

  
48
shared: libobjects
64
shared: objects
49 65
	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 66
	g++ -shared -o${DISK}/lib/libadmbo.so ../build/objects/dist/optlp-*.obj
51 67
	$(MAKE) CXXFLAGS="$(CXXFLAGS)" ADMB_HOME="$(PWD)/${DISK}" --directory=../contrib build-ad2csv
......
71 87
	cp -f ../VERSION ${DISK}
72 88
	cp -f ../Makefile ${DISK}
73 89
	rm -rf `find ${DISK} -type d -name .svn`
90
	mkdir -p ../build/objects/dist/
74 91
else
75 92
	if exist ${DISK} rd /S /Q ${DISK}
76 93
	md ${DISK}
......
108 125
	$(MAKE) CXXFLAGS="$(CXXFLAGS)" ADMB_HOME="$(PWD)\${DISK}" --directory=..\contrib
109 126
endif
110 127

  
111
libs: objects
128
libs: $(OPTLP_DF1B2_SEPARABLE_OBJS) $(SAFLP_DF1B2_SEPARABLE_OBJS) $(OPTLP_LINAD99_OBJS) $(SAFLP_LINAD99_OBJS) $(OPTLP_NH99_OBJS) $(SAFLP_NH99_OBJS) $(OPTLP_TOOLS99_OBJS) $(SAFLP_TOOLS99_OBJS) ../build/objects/dist/saflp-sparse-hs_sparse.obj ../build/objects/dist/optlp-sparse-hs_sparse.obj
112 129
ifeq ($(SHELL),sh.exe)
113 130
	if not exist ${DISK}\lib md ${DISK}\lib
114 131
	if exist ${DISK}\lib\libadmb.a del ${DISK}\lib\libadmb.a
......
116 133
	$(AR) -rs ${DISK}\lib\libadmb.a ..\build\objects\dist\saflp-df1b2-separable-*.obj
117 134
	$(AR) -rs ${DISK}\lib\libadmb.a ..\build\objects\dist\optlp-nh99-*.obj
118 135
	$(AR) -rs ${DISK}\lib\libadmb.a ..\build\objects\dist\optlp-tools99-*.obj
136
	$(AR) -rs ${DISK}\lib\libadmb.a ..\build\objects\dist\optlp-sparse-*.obj
119 137
	if exist ${DISK}\lib\libadmbo.a del ${DISK}\lib\libadmbo.a
120 138
	$(AR) -rs ${DISK}\lib\libadmbo.a ..\build\objects\dist\optlp-linad99-*.obj
121 139
	$(AR) -rs ${DISK}\lib\libadmbo.a ..\build\objects\dist\optlp-df1b2-separable-*.obj
122 140
	$(AR) -rs ${DISK}\lib\libadmbo.a ..\build\objects\dist\optlp-nh99-*.obj
123 141
	$(AR) -rs ${DISK}\lib\libadmbo.a ..\build\objects\dist\optlp-tools99-*.obj
142
	$(AR) -rs ${DISK}\lib\libadmbo.a ..\build\objects\dist\optlp-sparse-*.obj
124 143
else
125 144
	mkdir -p ${DISK}/lib
126 145
	rm -vf ${DISK}/lib/libadmb.a
......
128 147
	$(AR) -rs ${DISK}/lib/libadmb.a ../build/objects/dist/saflp-df1b2-separable-*.obj
129 148
	$(AR) -rs ${DISK}/lib/libadmb.a ../build/objects/dist/saflp-nh99-*.obj
130 149
	$(AR) -rs ${DISK}/lib/libadmb.a ../build/objects/dist/saflp-tools99-*.obj
150
	$(AR) -rs ${DISK}/lib/libadmb.a ../build/objects/dist/saflp-sparse-*.obj
131 151
	rm -vf ${DISK}/lib/libadmbo.a
132 152
	$(AR) -rs ${DISK}/lib/libadmbo.a ../build/objects/dist/optlp-linad99-*.obj
133 153
	$(AR) -rs ${DISK}/lib/libadmbo.a ../build/objects/dist/optlp-df1b2-separable-*.obj
134 154
	$(AR) -rs ${DISK}/lib/libadmbo.a ../build/objects/dist/optlp-nh99-*.obj
135 155
	$(AR) -rs ${DISK}/lib/libadmbo.a ../build/objects/dist/optlp-tools99-*.obj
156
	$(AR) -rs ${DISK}/lib/libadmbo.a ../build/objects/dist/optlp-sparse-*.obj
136 157
endif
137 158

  
138
objects:
139
ifeq ($(SHELL),sh.exe)
140
	if not exist ..\build\objects md ..\build\objects
141
	if not exist ..\build\objects\dist md ..\build\objects\dist
142
	$(MAKE) --directory=df1b2-separable CC=$(CC) CXX=$(CXX) CXXFLAGS="$(CXXFLAGS) -DOPT_LIB $(CXXFLAGS_INCLUDES)" PREFIX_OBJ=..\${LIBPATH}\optlp-df1b2-separable- DISKDIR=..\${DISK}
143
	$(MAKE) --directory=df1b2-separable CXX=$(CXX) CXXFLAGS="$(CXXFLAGS) -DSAFE_ALL $(CXXFLAGS_INCLUDES)" PREFIX_OBJ=..\${LIBPATH}\saflp-df1b2-separable- DISKDIR=..\${DISK}
144
	$(MAKE) --directory=tools99 CXX=$(CXX) CXXFLAGS="$(CXXFLAGS) -DOPT_LIB $(CXXFLAGS_INCLUDES)" PREFIX_OBJ=..\${LIBPATH}\optlp-tools99- DISKDIR=..\${DISK}
145
	$(MAKE) --directory=tools99 CXX=$(CXX) CXXFLAGS="$(CXXFLAGS) -DSAFE_ALL $(CXXFLAGS_INCLUDES)" PREFIX_OBJ=..\${LIBPATH}\optlp-tools99- DISKDIR=..\${DISK}
146
	$(MAKE) --directory=nh99 CC=$(CC) CXX=$(CXX) CXXFLAGS="$(CXXFLAGS) -DOPT_LIB $(CXXFLAGS_INCLUDES)" PREFIX_OBJ=..\${LIBPATH}\optlp-nh99- ADMB_CONFIGURE=${ADMB_CONFIGURE} DISKDIR=..\${DISK}
147
	$(MAKE) --directory=nh99 CC=$(CC) CXX=$(CXX) CXXFLAGS="$(CXXFLAGS) -DSAFE_ALL $(CXXFLAGS_INCLUDES)" PREFIX_OBJ=..\${LIBPATH}\optlp-nh99- ADMB_CONFIGURE=${ADMB_CONFIGURE} DISKDIR=..\${DISK}
148
	$(MAKE) --directory=linad99 CXX=$(CXX) CXXFLAGS="$(CXXFLAGS) -DOPT_LIB $(CXXFLAGS_INCLUDES)" PREFIX_OBJ=..\${LIBPATH}\optlp-linad99- DISKDIR=..\${DISK} all1
149
	$(MAKE) --directory=linad99 CXX=$(CXX) CXXFLAGS="$(CXXFLAGS) -DOPT_LIB $(CXXFLAGS_INCLUDES)" PREFIX_OBJ=..\${LIBPATH}\optlp-linad99- DISKDIR=..\${DISK} all2
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff