source: trunk/make/testcase/prog-c.mak@ 8706

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

Merged in latest changes.

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