Debian Codegraph @

platforms/Dos/Makefile

raw symbols SCIP
1 CXX := wcl
2 CC := wcl
3 AR := wlib
4 LINK := wlink
5 LOG := ALLTESTS.LOG
6 NULL :=
7 space := $(NULL) #
8 comma := ,
9 path_separator := /
10 drive = $(subst $(CYGDRIVE),$(lastword $(subst /, ,$(CYGDRIVE))):/,$(1))
11 convert_paths = $(if $(CYGDRIVE),$(subst /,$(path_separator),$(call drive,$(1))),$(1))
12
13 -include $(CPPUTEST_HOME)/platforms/Dos/platform.mk
14 include $(CPPUTEST_HOME)/platforms/Dos/sources.mk
15
16 # Disable W013 unreachable code - it overreacts to CHECK_EQUAL macros
17 # Disable W367 conditional expression in if statement is always true - same
18 # Disable W368 conditional expression in if statement is always false - same
19 # Disable W391 assignment found in boolean expression - we don't care
20
21 CFLAGS := \
22 -q -c -os -oc -d0 -we -w=3 -wcd=13 -wcd=367 -wcd=368 -wcd391 -wcd=472 -ml -zm \
23 -dCPPUTEST_MEM_LEAK_DETECTION_DISABLED=1 -dCPPUTEST_STD_CPP_LIB_DISABLED=1 \
24 -i$(call convert_paths,$(CPPUTEST_HOME)/include) \
25 -i$(call convert_paths,$(CPPUTEST_HOME)/include/Platforms/Dos) \
26 -i$(call convert_paths,$(WATCOM)/h) -i$(call convert_paths,$(WATCOM)/h/nt) \
27
28 CXXFLAGS := $(CFLAGS) -xds
29
30 .PHONY: all clean
31
32 all: CPPU.LIB CPPUX.LIB \
33 CPPU1.EXE CPPU2.EXE CPPU3.EXE CPPU4.EXE CPPU5.EXE CPPU6.EXE CPPU7.EXE CPPU8.EXE \
34 CPPUX1.EXE CPPUX2.EXE CPPUX3.EXE CPPUX4.EXE CPPUX5.EXE CPPUX6.EXE CPPUX7.EXE CPPUX8.EXE CPPUX9.EXE
35
36 clean:
37 rm -rf ../src/CppUTest/*.o ../src/CppUTestExt/*.o \
38 ../src/Platforms/dos/*.o ../tests/*.o ../tests/CppUTestExt/*.o \
39 *.o *.map *.txt *.LOG *.EXE *.err *.LIB *.LST
40
41 %.o: %.cpp
42 $(CXX) $(CXXFLAGS) -fo=$(call convert_paths,$@) $(call convert_paths,$<)
43
44 %.o: %.c
45 $(CC) $(CFLAGS) -fo=$(call convert_paths,$@) $(call convert_paths,$<)
46
47 .SECONDEXPANSION:
48
49 %.LIB: $$($$*_OBJECTS)
50 $(AR) -q -lCPPU.LST $@ $(addprefix +,$(call convert_paths,$?))
51
52 %.EXE: $$($$*_OBJECTS) | CPPU.LIB CPPUX.LIB
53 $(LINK) opt q,map,st=50k sys dos lib CPPU.LIB,CPPUX.LIB \
54 file $(subst $(space),$(comma),$(call convert_paths,$?)) name $@