Line | |
---|
1 | # $Id: prog-cxx-as-c.mak,v 1.1 2002-05-16 11:37:07 bird Exp $
|
---|
2 |
|
---|
3 | # Testcase for makeing simple C programs as C++.
|
---|
4 |
|
---|
5 | # root & setup
|
---|
6 | CXX_AS_CC= 1
|
---|
7 | PATH_ROOT=..\..
|
---|
8 | !include $(PATH_ROOT)\make\setup.mak
|
---|
9 |
|
---|
10 | # target config.
|
---|
11 | TARGET_NAME = prog-c
|
---|
12 | MAKEFILE = prog-c-as-cxx.mak
|
---|
13 | TARGET_LIBS = $(LIB_C_OBJ) $(LIB_OS) # use the static library!
|
---|
14 |
|
---|
15 | # rules and more
|
---|
16 | !include $(MAKE_INCLUDE_PROCESS)
|
---|
17 |
|
---|
18 |
|
---|
19 | # some helpers for the output.
|
---|
20 | !if "$(BUILD_MODE)" == "DEBUG" || "$(BUILD_MODE)" == "PROFILE"
|
---|
21 | _STR1 = Hello "C" "DEBUG" World!
|
---|
22 | !else
|
---|
23 | _STR1 = Hello "C" World!
|
---|
24 | !endif
|
---|
25 |
|
---|
26 | !ifdef ENV_16BIT
|
---|
27 | _STR2 = __16BIT__
|
---|
28 | !else
|
---|
29 | _STR2 = __32BIT__
|
---|
30 | !endif
|
---|
31 |
|
---|
32 |
|
---|
33 | #
|
---|
34 | # validate that the executable actually runs and produces the desired output.
|
---|
35 | #
|
---|
36 | test:
|
---|
37 | !if "$(MAKE_INCLUDE_PROCESS:process.forwarder=)" == "$(MAKE_INCLUDE_PROCESS)"
|
---|
38 | $(TARGET) > out
|
---|
39 | ! ifdef BUILD_VERBOSE
|
---|
40 | type out
|
---|
41 | ! endif
|
---|
42 | $(TOOL_CMP) out <<
|
---|
43 | $(_STR1)
|
---|
44 |
|
---|
45 | $(_STR2)
|
---|
46 |
|
---|
47 | <<
|
---|
48 | !else
|
---|
49 | ! ifndef BUILD_VERBOSE
|
---|
50 | @ \
|
---|
51 | ! endif
|
---|
52 | $(TOOL_BUILDENV) $(BUILD_ENVS_CHANGE) * $(TOOL_MAKE) -f $(MAKEFILE) $@
|
---|
53 | !endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.