Revision 1389 trunk/contrib/ecolib/GNUmakefile

GNUmakefile (revision 1389)
2 2

  
3 3
all: $(addprefix $(PREFIX_OBJ), $(OBJECTS))
4 4

  
5
$(PREFIX_OBJ)%.obj: %.cpp
6
ifeq ($(SHELL),sh.exe)
7
	..\..\admb -c $(OPTION) $<
8
	copy $(basename $<).obj $@
9
else
10
	../../admb -c $(OPTION) $<
11
	cp $(basename $<).obj $@
12
endif
13

  
5 14
test:
6 15
ifneq ($(SHELL),sh.exe)
7
	ADMB_HOME="../$(ADMB_HOME)" PATH="../$(ADMB_HOME)/bin:$(PATH)" make --directory=tests
16
	make --directory=tests
8 17
endif
9 18

  
10 19
clean:
11 20
ifneq ($(SHELL),sh.exe)
21
	@rm -vf *.obj
22
	@rm -vf *.o
12 23
	@rm -vf tests/tests.log
13 24
	@rm -vf tests/tests.cpp
14 25
	@rm -vf tests/admodel.hes
......
27 38
	@rm -vf tests/tests.eva
28 39
	@rm -vf tests/admodel.dep
29 40
endif
30

  
31
$(PREFIX_OBJ)%.obj: %.cpp
32
ifeq ($(CXX),cl)
33
	$(CXX) /c $(CXXFLAGS) /Fo$@ $<
34
else
35
	$(CXX) -c $(CXXFLAGS) -o$@ $<
36
endif

Also available in: Unified diff