source: trunk/make/testcase/dll-c.mak@ 9055

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

Watcom 16-bit workarounds. Use new rules.

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