Revision 1087 branches/threaded2/examples/threaded/multisimple/Makefile

Makefile (revision 1087)
20 20
LFLAGS = -L$(ADMB_HOME)/lib -ldf1b2s -ladmod -ladt -lads -ldf1b2s -ladmod -ladt -lads -ldf1b2s -ladmod -ladt -lads -lpthread
21 21
#LFLAGS = -L$(ADMB_HOME)/lib -ldf1b2s -ladmod -ladt -lado -ldf1b2o -ladmod -ladt -lado -ldf1b2o -ladmod -ladt -lado -lpthread
22 22

  
23
#OBJECTS=adpthread_manager.o msimple.o simple_thread.o
24
OBJECTS=msimple.o
25 23

  
26
# link the object file into the executable 
27
msimple: $(OBJECTS) 
28
	@echo
29
	@echo ------- Link $@
30
	$(LL) -o $@ $^ $(LFLAGS)
31
	@echo ------- Done
24
all: msimple
32 25

  
33
msimple1: msimple1.o
26
%:%.o
34 27
	@echo
35 28
	@echo ------- Link $@
36 29
	$(LL) -o $@ $^ $(LFLAGS)
37 30
	@echo ------- Done
38 31

  
39
simple_thread.o: simple_thread.cpp msimple.tpl msimple.htp
40
	@echo
41
	@echo ------- Compile $<
42
	sed -i '/class model_data : public ad_comm{/a\
43
          public:' msimple.htp
44
	sed -i '{s/^private/public/}' msimple.htp
45
	$(CC) $(CFLAGS)  -o $@ $<
46
	@echo ------- Done
47 32

  
48 33
# compile the C++ into an object file
49 34
%.o:%.cpp;
......
58 43
	@echo ------- Making $@
59 44
	@echo ------- Translate $<
60 45
	$(ADMB_HOME)/bin/tpl2cpp $*
61
#cp -v $@ $(OBJ_DIR)
62 46
	@echo ------- Done
63 47

  
64 48
%.htp:%.tpl;
......
83 67

  
84 68
clean:
85 69
	rm -fv msimple.cpp
86
	rm -fv msimple1.cpp
87 70
	rm -fv msimple
88
	rm -fv msimple1
89 71
	rm -fv *.o
90 72
	rm -fv *.htp
91 73
	rm -fv *.log

Also available in: Unified diff