| Line | |
|---|
| 1 | # $Id: prog-cxx.mak,v 1.1 2002-05-16 11:37:08 bird Exp $
|
|---|
| 2 |
|
|---|
| 3 | # Testcase for makeing simple C++ programs.
|
|---|
| 4 |
|
|---|
| 5 | # root & setup
|
|---|
| 6 | PATH_ROOT=..\..
|
|---|
| 7 | !include $(PATH_ROOT)\make\setup.mak
|
|---|
| 8 |
|
|---|
| 9 | # target config.
|
|---|
| 10 | TARGET_NAME = prog-cxx
|
|---|
| 11 | MAKEFILE = prog-cxx.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 | # 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 | #
|
|---|
| 35 | test:
|
|---|
| 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.