source: trunk/make/testcase/prog-cxx-as-c.mak@ 8423

Last change on this file since 8423 was 8423, checked in by bird, 23 years ago

Merged in latest changes.

File size: 1020 bytes
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
6CXX_AS_CC= 1
7PATH_ROOT=..\..
8!include $(PATH_ROOT)\make\setup.mak
9
10# target config.
11TARGET_NAME = prog-c
12MAKEFILE = prog-c-as-cxx.mak
13TARGET_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#
36test:
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.