Revision 1438 trunk/contrib/src/GNUmakefile

GNUmakefile (revision 1438)
1
.ONESHELL:
2
ifeq (sh.exe,$(findstring sh.exe,$(SHELL)))
3
SHELL = cmd
4
endif
1 5
ifeq ($(OS),Windows_NT)
2 6
EXT=.sh
3 7
endif
......
2 6

  
3
all: $(PREFIX)contrib.obj
7
OBJECTS=contrib.obj
8
HEADERS=contrib.h
4 9

  
5
$(PREFIX)%.obj: %.cpp
6
ifeq ($(SHELL),sh.exe)
10
ifeq ($(SHELL),cmd)
11
all: $(addprefix $(CONTRIB_OBJS_DIR)\saflp-contrib-, $(OBJECTS)) $(addprefix $(CONTRIB_OBJS_DIR)\optlp-contrib-, $(OBJECTS))
12

  
13
$(CONTRIB_OBJS_DIR)\saflp-contrib-%.obj: %.cpp
7 14
	..\..\admb -c $(OPTION) $<
8 15
	copy $(basename $<).obj $@
9
	copy contrib.h $(CONTRIB_DIR)\include
16

  
17
$(CONTRIB_OBJS_DIR)\optlp-contrib-%.obj: %.cpp
18
	..\..\admb -c -f $(OPTION) $<
19
	copy $(basename $<).obj $@
10 20
else
21
all: $(addprefix $(CONTRIB_OBJS_DIR)/saflp-contrib-, $(OBJECTS)) $(addprefix $(CONTRIB_OBJS_DIR)/optlp-contrib-, $(OBJECTS))
22

  
23
$(CONTRIB_OBJS_DIR)/saflp-contrib-%.obj: %.cpp
11 24
	../../admb$(EXT) -c $(OPTION) $<
12 25
	cp $(basename $<).obj $@
13
	cp contrib.h $(CONTRIB_DIR)/include
26

  
27
$(CONTRIB_OBJS_DIR)/optlp-contrib-%.obj: %.cpp
28
	../../admb$(EXT) -c -f $(OPTION) $<
29
	cp $(basename $<).obj $@
14 30
endif
15 31

  
32
includes:
33
ifeq ($(SHELL),cmd)
34
	copy $(HEADERS) $(CONTRIB_INCLUDE)
35
else
36
	cp $(HEADERS) $(CONTRIB_INCLUDE)
37
endif
38

  
16 39
test:
17
ifeq ($(SHELL),sh.exe)
40
ifeq ($(SHELL),cmd)
18 41
	..\..\admb $(OPTION) simple.tpl
......
25 48
endif
26 49

  
27 50
clean:
28
ifeq ($(SHELL),sh.exe)
29
	del contrib.obj
30
	del contrib.o
31
	del simple.obj
32
	del simple.o
33
	del simple.std
34
	del simple.htp
35
	del admodel.hes
36
	del variance
37
	del simple
38
	del simple.exe
39
	del admodel.cov
40
	del simple.bar
41
	del eigv.rpt
42
	del simple.eva
43
	del fmin.log
44
	del simple.log
45
	del simple.cpp
46
	del simple.par
47
	del simple.cor
48
	del admodel.dep
51
ifeq ($(SHELL),cmd)
52
	@del /Q $(OBJECTS)
49 53
else
50
	@rm -f contrib.obj
51
	@rm -f contrib.o
52
	@rm -f simple.obj
53
	@rm -f simple.o
54
	@rm -f simple.std
55
	@rm -f simple.htp
56
	@rm -f admodel.hes
57
	@rm -f variance
58
	@rm -f simple
59
	@rm -f simple.exe
60
	@rm -f admodel.cov
61
	@rm -f simple.bar
62
	@rm -f eigv.rpt
63
	@rm -f simple.eva
64
	@rm -f fmin.log
65
	@rm -f simple.log
66
	@rm -f simple.cpp
67
	@rm -f simple.par
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff