Revision 1443 trunk/contrib/qfclib/GNUmakefile

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

  
9
include objects.lst
10 1
HEADERS=qfclib.h
2
OBJECTS= qfc_est.obj qfc_sim.obj
11 3

  
12
ifeq ($(SHELL),cmd)
13
all: $(addprefix $(CONTRIB_OBJS_DIR)\saflp-contrib-, $(OBJECTS)) $(addprefix $(CONTRIB_OBJS_DIR)\optlp-contrib-, $(OBJECTS))
14

  
15
$(CONTRIB_OBJS_DIR)\saflp-contrib-%.obj: %.cpp
16
	..\..\admb -c $(OPTION) $<
17
	copy $(basename $<).obj $@
18

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

  
25
$(CONTRIB_OBJS_DIR)/saflp-contrib-%.obj: %.cpp
26
	../../admb$(EXT) -c $(OPTION) $<
27
	cp $(basename $<).obj $@
28

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

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

  
41
test:
42
	$(MAKE) --directory=tests
43

  
44
clean:
45
ifeq ($(SHELL),cmd)
46
	del /Q $(OBJECTS)
47
else
48
	@rm -vf $(OBJECTS)
49
endif
4
include ../admb-rules.mak

Also available in: Unified diff