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