Revision 1606

trunk/tests/xml/sedflex (revision 1606)
1
/^# line/d
2
/char \*malloc();/d
3
/#line.*stdin.*$/d
4
/#line.*lexyy.*$/d
5
/#line.*lex.yy.*$/d
6
/int free();/d
7
/int read();/d
8
s=//.*$==
9
s/fopen$//
10
s/extern int yywrap YY_PROTO(( void ));/int yywrap YY_PROTO(( void )){return 1;}/
0 11

  
trunk/tests/xml/Makefile (revision 1606)
1
# extensivly hacked version of
2
# A Generic Makefile for ADMB programs that also includes additonal libraries.
3
# Developed for Mac OSx using the clang++ compiler
4
# Author: Steve Martell & John Sibert
5
# —————————————————————— INSTRUCTIONS ———————————————————————— #
6
# 1. Set the EXEC variable to the name of the program.         #
7
# 2. List additional .cpp files required by EXEC in SRCS macro #
8
# 3. Set the ADMB_HOME path to your distribution of ADMB.      #
9
# 4. To make executables with ADMB "safe" library type: make   #
10
# 5. Optimized executables type: make OPT=TRUE                 #
11
# ———————————————————————————————————————————————————————————— #
12
#TARGETS = xpella pella-xml
13
#SRCS = $(TARGETS).cpp ADMB_XMLDoc.cpp 
14
#OBJS = $(SRCS:.cpp=.o)
15
#TPLS = $(TARGETS).tpl
16
#DEPS = $(SRCS:.cpp=.depends)
17

  
18
# Export the path to your ADMB dist directory
19
# export ADMB_HOME=/home/jsibert/admb/trunk/build/dist
20

  
21
# establish the C++ compiler (on Mac OSX use clang++)
22
CC=gcc
23
CXX=g++
24
# CC=clang
25
# CXX=clang++
26
# and linker
27
LL = $(CC)
28
LD = $(CXX)
29
# Remove macro
30
RM=rm -fv
31

  
32
# identify some extra file name suffixes
33
.SUFFIXES: .tpl .cpp .o .obj
34

  
35
# tell make not to delete these intermediate targets
36
.PRECIOUS: %.c %.cpp %.o %.obj
37

  
38
# make some special PHONY targets
39
.PHONY: all help rules clean dox
40

  
41
# set up ADMB flags and appropriate libraries
42
# make the "safe" version by default
43
# to make "the optimized" version, type  `make OPT=TRUE
44
ifeq ($(OPT),TRUE)
45
  CC_OPT = -O3 -DOPT_LIB
46
  LDFLAGS = -O3 
47
  LDLIBS  = $(ADMB_HOME)/lib/libadmbo.a $(ADMB_HOME)/contrib/lib/libcontribo.a -lxml2
48
else
49
  CC_OPT = -O0 -DSAFE_ALL -ggdb
50
  LDFLAGS = -O0 -ggdb
51
  LDLIBS  = $(ADMB_HOME)/lib/libadmb.a $(ADMB_HOME)/contrib/lib/libcontrib.a -lxml2
52
endif
53

  
54
# set general compiler flags
55
CXXFLAGS = $(CC_OPT) -D__GNUDOS__ -Dlinux -DUSE_LAPLACE  -I. -I$(ADMB_HOME)/include -I$(ADMB_HOME)/contrib/include -I/usr/include/libxml2 
56

  
57

  
58
# this is the default target
59
all: tpl2cpp pella-xml xpella simple
60

  
61
# link the object file into the executable 
62
pella-xml: pella-xml.o ADMB_XMLDoc.o
63
	$(LD) $(LDFLAGS) -o  $@ $^ $(LDLIBS)
64

  
65
xpella: xpella.o ADMB_XMLDoc.o model_xml.o
66
	$(LD) $(LDFLAGS) -o  $@ $^ $(LDLIBS)
67

  
68
simple: simple.o ADMB_XMLDoc.o model_xml.o
69
	$(LD) $(LDFLAGS) -o  $@ $^ $(LDLIBS)
70

  
71
# Advanced Auto Dependency Generation
72
# Check compiler options for generating phony targets (-MP -MD for clang compiler on OSX)
73
%.o : %.cpp
74
	$(CXX) -MP -MD -c -o $@ $< $(CXXFLAGS)
75

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

Also available in: Unified diff