| Line |  | 
|---|
| 1 | # $Id: dll-prog-c.mak,v 1.4 2002-08-28 03:40:03 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_MODE = EXE | 
|---|
| 11 | TARGET_NAME = dll-prog-c | 
|---|
| 12 | MAKEFILE    = dll-prog-c.mak | 
|---|
| 13 | TARGET_LIBS = $(LIB_C_OBJ) $(LIB_OS)    # use the static library! | 
|---|
| 14 |  | 
|---|
| 15 | # rules and more | 
|---|
| 16 | RULES_FORWARD = test | 
|---|
| 17 | !include $(MAKE_INCLUDE_PROCESS) | 
|---|
| 18 |  | 
|---|
| 19 | !if !$(BUILD_FORWARDING) | 
|---|
| 20 |  | 
|---|
| 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 | OUTFILE = out | 
|---|
| 40 | test: | 
|---|
| 41 | $(TOOL_MAKE) -f dll-c.mak rebuild | 
|---|
| 42 | $(TARGET) $(PATH_OBJ)\dll-c.dll\dll-c.dll > $(OUTFILE) | 
|---|
| 43 | ! ifdef BUILD_VERBOSE | 
|---|
| 44 | type $(OUTFILE) | 
|---|
| 45 | ! endif | 
|---|
| 46 | $(TOOL_CMP) $(OUTFILE) << | 
|---|
| 47 | DLLInit | 
|---|
| 48 | $(_STR1) | 
|---|
| 49 | $(_STR2) | 
|---|
| 50 | FOOName | 
|---|
| 51 | DLLTerm | 
|---|
| 52 | << | 
|---|
| 53 | $(TOOL_MAKE) -f dll-c.mak clean | 
|---|
| 54 |  | 
|---|
| 55 | !endif | 
|---|
| 56 |  | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.