Revision 885

trunk/src/tools99/GNUmakefile (revision 885)
3 3
all: $(addprefix $(PREFIX_OBJ), $(OBJ0) $(OBJ1) $(OBJ2) $(OBJ3))
4 4

  
5 5
$(PREFIX_OBJ)%.obj: %.cpp
6
	$(CXX) $(CXXFLAGS) -o $@ $<
6
	$(CXX) -c $(CXXFLAGS) -o $@ $<
trunk/src/GNUmakefile (revision 885)
21 21
endif
22 22

  
23 23
ifdef DEBUG
24
CXXFLAGS:=-c -g $(CXXFLAGS)
24
CXXFLAGS:=-g $(CXXFLAGS)
25 25
else
26
CXXFLAGS:=-c -O3 $(CXXFLAGS)
26
CXXFLAGS:=-O3 $(CXXFLAGS)
27 27
endif
28 28

  
29 29
all: dist contrib
30 30
	@printf "\nADMB build completed.\n"
31 31
	@printf "For installation, check README.txt.\n"
32 32

  
33
dist: includes examples bins
33
dist:
34
	rm -rf ${DISK}/contrib
35
	rm -rf ${DISK}/docs
36
	rm -rf ${DISK}/examples
37
	rm -rf ${DISK}/src
38
	rm -rf ${DISK}/tests
39
	rm -rf ${DISK}/utilities
40
	mkdir -p ${DISK}
41
	cp -R ../contrib ${DISK}
42
	cp -R ../docs ${DISK} 
43
	cp -R ../examples ${DISK}
44
	cp -R ../src ${DISK}
45
	cp -R ../tests ${DISK}
46
	cp -R ../utilities ${DISK}
47
	cp -f ../LICENSE.txt ${DISK}
48
	cp -f ../README.txt ${DISK}
49
	cp -f ../NEWS.txt ${DISK}
50
	cp -f ../VERSION ${DISK}
51
	cp -f ../Makefile ${DISK}
52
	rm -rf `find ${DISK} -type d -name .svn`
53

  
54
contrib: includes bins libs
55
	mkdir -p ${DISK}/contrib/include
56
	mkdir -p ${DISK}/contrib/lib
57
	mkdir -p ${DISK}/contrib/bin
58
	$(MAKE) ADMB_HOME="${ADMB_HOME}" --directory=../contrib
59

  
60
libs: admbsaf admbopt
61

  
62
admbsaf:
63
	mkdir -p ${DISK}/lib
34 64
	mkdir -p ${LIBPATH}
35 65
	$(MAKE) --directory=df1b2-separable CXX=$(CXX) CXXFLAGS="$(CXXFLAGS) -DSAFE_ALL $(CXXFLAGS_INCLUDES)" PREFIX_OBJ=../${LIBPATH}/saflp-df1b2-separable- DISKDIR=../${DISK}
36
	$(MAKE) --directory=df1b2-separable CC=$(CC) CXX=$(CXX) CXXFLAGS="$(CXXFLAGS) -DOPT_LIB $(CXXFLAGS_INCLUDES)" PREFIX_OBJ=../${LIBPATH}/optlp-df1b2-separable- DISKDIR=../${DISK}
37 66
	$(MAKE) --directory=linad99 CXX=$(CXX) CXXFLAGS="$(CXXFLAGS) -DSAFE_ALL $(CXXFLAGS_INCLUDES)" PREFIX_OBJ=../${LIBPATH}/saflp-linad99- DISKDIR=../${DISK}
38
	$(MAKE) --directory=linad99 CXX=$(CXX) CXXFLAGS="$(CXXFLAGS) -DOPT_LIB $(CXXFLAGS_INCLUDES)" PREFIX_OBJ=../${LIBPATH}/optlp-linad99- DISKDIR=../${DISK}
39 67
	$(MAKE) --directory=nh99 CC=$(CC) CXX=$(CXX) CXXFLAGS="$(CXXFLAGS) -DOPT_LIB $(CXXFLAGS_INCLUDES)" PREFIX_OBJ=../${LIBPATH}/optlp-nh99- ADMB_CONFIGURE=${ADMB_CONFIGURE} DISKDIR=../${DISK}
40 68
	$(MAKE) --directory=tools99 CXX=$(CXX) CXXFLAGS="$(CXXFLAGS) -DOPT_LIB $(CXXFLAGS_INCLUDES)" PREFIX_OBJ=../${LIBPATH}/optlp-tools99- DISKDIR=../${DISK}
41

  
42
	mkdir -p ${DISK}/lib
43 69
	rm -vf ${DISK}/lib/libadmb.a
44 70
	$(AR) -rs ${DISK}/lib/libadmb.a ../build/objects/dist/saflp-linad99-*.obj
45 71
	$(AR) -rs ${DISK}/lib/libadmb.a ../build/objects/dist/saflp-df1b2-separable-*.obj
46 72
	$(AR) -rs ${DISK}/lib/libadmb.a ../build/objects/dist/optlp-nh99-*.obj
47 73
	$(AR) -rs ${DISK}/lib/libadmb.a ../build/objects/dist/optlp-tools99-*.obj
48 74

  
75
admbopt:
76
	mkdir -p ${DISK}/lib
77
	mkdir -p ${LIBPATH}
78
	$(MAKE) --directory=df1b2-separable CC=$(CC) CXX=$(CXX) CXXFLAGS="$(CXXFLAGS) -DOPT_LIB $(CXXFLAGS_INCLUDES)" PREFIX_OBJ=../${LIBPATH}/optlp-df1b2-separable- DISKDIR=../${DISK}
79
	$(MAKE) --directory=linad99 CXX=$(CXX) CXXFLAGS="$(CXXFLAGS) -DOPT_LIB $(CXXFLAGS_INCLUDES)" PREFIX_OBJ=../${LIBPATH}/optlp-linad99- DISKDIR=../${DISK}
80
	$(MAKE) --directory=nh99 CC=$(CC) CXX=$(CXX) CXXFLAGS="$(CXXFLAGS) -DOPT_LIB $(CXXFLAGS_INCLUDES)" PREFIX_OBJ=../${LIBPATH}/optlp-nh99- ADMB_CONFIGURE=${ADMB_CONFIGURE} DISKDIR=../${DISK}
81
	$(MAKE) --directory=tools99 CXX=$(CXX) CXXFLAGS="$(CXXFLAGS) -DOPT_LIB $(CXXFLAGS_INCLUDES)" PREFIX_OBJ=../${LIBPATH}/optlp-tools99- DISKDIR=../${DISK}
49 82
	rm -vf ${DISK}/lib/libadmbo.a
50 83
	$(AR) -rs ${DISK}/lib/libadmbo.a ../build/objects/dist/optlp-linad99-*.obj
51 84
	$(AR) -rs ${DISK}/lib/libadmbo.a ../build/objects/dist/optlp-df1b2-separable-*.obj
52 85
	$(AR) -rs ${DISK}/lib/libadmbo.a ../build/objects/dist/optlp-nh99-*.obj
53 86
	$(AR) -rs ${DISK}/lib/libadmbo.a ../build/objects/dist/optlp-tools99-*.obj
54 87

  
55
	rm -rf ${DISK}/src
56
	cp -R ../src ${DISK}
57

  
58
	rm -rf ${DISK}/docs
59
	cp -R ../docs ${DISK} 
60

  
61
	rm -rf ${DISK}/tests
62
	cp -R ../tests ${DISK}
63

  
64
	rm -rf ${DISK}/utilities
65
	cp -R ../utilities ${DISK}
66

  
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff