Revision 1064

trunk/Makefile (revision 1064)
3 3
debug: $(CXX)-debug
4 4
verify: $(CXX)-verify
5 5
test: $(CXX)-test
6
shared: g++-shared
6 7
install: $(CXX)-install
7 8
clean: $(CXX)-clean
8 9

  
......
47 48
	$(MAKE) --directory=src CC=gcc CXX=g++ verify
48 49
g++-test:
49 50
	$(MAKE) --directory=src CC=gcc CXX=g++ tests
51
g++-shared:
52
	$(MAKE) --directory=src CC=gcc CXX=g++ BUILD_SHARED_LIBRARY=1 all shared
50 53
g++-install:
51 54
	$(MAKE) --directory=src CC=gcc CXX=g++ install
52 55
g++-clean:
trunk/contrib/GNUmakefile (revision 1064)
15 15
LIBPATH=../../build/objects/dist
16 16
endif
17 17

  
18
ad2csv: build-ad2csv
19

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

  
27
ad2csv: build-ad2csv
28

  
29 29
build-gdbprintlib:
30 30
	$(MAKE) --directory=gdbprintlib CXX=$(CXX) CXXFLAGS="-DSAFE_ALL $(CXXFLAGS) -I\"$(ADMB_HOME)/include\"" PREFIX_OBJ=$(LIBPATH)/saflp-contrib-gdbprintlib-
31 31
ifeq ($(SHELL),sh.exe)
trunk/scripts/admb/adlink-shared (revision 1064)
1
#!/bin/bash
2
shopt -s expand_aliases
3
alias help='echo -e "Usage: adlink [-d] [-g] [-r] [-s] model\n
4
Link AD Model Builder object code to executable.\n
5
  -d     Create DLL
6
  -g     Insert debugging symbols
7
  -r     Create ADMB-RE
8
  -s     Enforce safe bounds
9
  model  Filename prefix, e.g. simple\n"'
10
if [[ "$1" == "" ]]; then help; exit; fi
11
if [[ "$1" == "-help" ]]; then help; exit; fi
12
if [[ "$1" == "--help" ]]; then help; exit; fi
13

  
14
unset shared
15
sym=
16
opt=
17
while getopts "dgrso" A; do
18
  case $A in
19
    d) shared=-shared;;
20
    g) unset sym;;
21
    r) ;;
22
    s) ;;
23
    o) opt=o;;
24
  esac
25
done
26
shift $((OPTIND-1))
27

  
28
if [[ "`uname -s`" == "Darwin" ]]; then unset sym; fi
29

  
30
model="${1%.*}"
31

  
32
objects=
33
for file in $*
34
do
35
  extension="${file#*.}"
36
  if [ "$extension" = "$file" ]; then
37
    objects="${file%.*}.o $objects"
38
  elif [ "$extension" = "obj" -o "$extension" = "o" ]; then
39
    objects="$objects $file"
40
  fi 
41
done
42

  
43
if [ -z "$CXX" ]; then
44
  if [ -f "$ADMB_HOME/bin/admb-cfg.sh" ]; then
45
    source "$ADMB_HOME/bin/admb-cfg.sh"
46
  else
47
    CXX=c++
48
  fi
49
fi
50

  
51
LDFLAGS="$LDFLAGS"
52
if [ ! -z "$sym" ]; then
53
  LDFLAGS="$LDFLAGS $sym"
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff