| Line | |
|---|
| 1 | # $Id: dll-prog-c.mak,v 1.2 2002-08-20 08:01:46 bird Exp $
|
|---|
| 2 |
|
|---|
| 3 | # Testcase for makeing simple C DLLs.
|
|---|
| 4 |
|
|---|
| 5 | # root & setup
|
|---|
| 6 | PATH_ROOT=..\..
|
|---|
| 7 | !include $(PATH_ROOT)\make\setup.mak
|
|---|
| 8 |
|
|---|
| 9 | # target config.
|
|---|
| 10 | TARGET_NAME = dll-prog-c
|
|---|
| 11 | MAKEFILE = dll-prog-c.mak
|
|---|
| 12 | TARGET_LIBS = $(LIB_C_OBJ) $(LIB_OS) # use the static library!
|
|---|
| 13 |
|
|---|
| 14 | # rules and more
|
|---|
| 15 | !include $(MAKE_INCLUDE_PROCESS)
|
|---|
| 16 |
|
|---|
| 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 | $(TOOL_MAKE) -f dll-c.mak rebuild
|
|---|
| 39 | $(TARGET) $(PATH_OBJ)\dll-c.dll\dll-c.dll > out
|
|---|
| 40 | ! ifdef BUILD_VERBOSE
|
|---|
| 41 | type out
|
|---|
| 42 | ! endif
|
|---|
| 43 | $(TOOL_CMP) out <<
|
|---|
| 44 | DLLInit
|
|---|
| 45 | $(_STR1)
|
|---|
| 46 | $(_STR2)
|
|---|
| 47 | FOOName
|
|---|
| 48 | DLLTerm
|
|---|
| 49 | <<
|
|---|
| 50 | $(TOOL_MAKE) -f dll-c.mak clean
|
|---|
| 51 | !else
|
|---|
| 52 | ! ifndef BUILD_VERBOSE
|
|---|
| 53 | @ \
|
|---|
| 54 | ! endif
|
|---|
| 55 | $(TOOL_BUILDENV) $(BUILD_ENVS_CHANGE) * $(TOOL_MAKE) -f $(MAKEFILE) $@
|
|---|
| 56 | !endif
|
|---|
| 57 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.