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