[10301] | 1 | # $Id: odin32.mk,v 1.10 2003-10-26 01:47:50 bird Exp $
|
---|
[4718] | 2 |
|
---|
| 3 | #
|
---|
| 4 | # Odin32 API
|
---|
| 5 | #
|
---|
| 6 | # Create: cdmckill@novice.uwaterloo.ca, January 4th, 1998
|
---|
| 7 | # Modified: phaller@gmx.net, May 27th, 1999
|
---|
| 8 | # knut.stange.osmundsen@mynd.no, 2nd Dec. 2000
|
---|
| 9 | #
|
---|
| 10 |
|
---|
| 11 | #
|
---|
| 12 | # defines
|
---|
| 13 | # DEBUG - build a debug version instead of release version
|
---|
[8239] | 14 | # PROFILE - build a profile release version instead of release version
|
---|
[4718] | 15 | # CCENV:
|
---|
| 16 | # VAC3 - use IBM VisualAge for C++ 3 compiler environment (default).
|
---|
| 17 | # VAC36 - use IBM VisualAge for C++ 3.6.5 compiler environment.
|
---|
| 18 | # WAT - use Watcom C/C++ v11.x compiler environment.
|
---|
| 19 | # EMX - use GNU/EMX compiler environment. (don't work!)
|
---|
| 20 | #
|
---|
| 21 |
|
---|
| 22 | #
|
---|
| 23 | # Determin compiler environment
|
---|
| 24 | #
|
---|
| 25 | !ifndef __VERSION__
|
---|
[6910] | 26 | NMAKE = 1
|
---|
[4718] | 27 | ! ifndef CCENV
|
---|
| 28 | CCENV = VAC3
|
---|
[6910] | 29 | MKFILE = $(CCENV)
|
---|
[4718] | 30 | DIREXT =
|
---|
| 31 | VAC3 = 1
|
---|
| 32 | ! else
|
---|
| 33 | ! if "$(CCENV)" == "VAC36"
|
---|
| 34 | CCENV = VAC36
|
---|
[6910] | 35 | MKFILE = $(CCENV)
|
---|
[4718] | 36 | DIREXT = .vac36
|
---|
| 37 | VAC36 = 1
|
---|
| 38 | ! else
|
---|
[6105] | 39 | ! if "$(CCENV)" == "EMX"
|
---|
| 40 | CCENV = EMX
|
---|
[6910] | 41 | MKFILE = $(CCENV)
|
---|
[6105] | 42 | DIREXT = .emx
|
---|
| 43 | EMXENV = 1 # Can't use EMX. (SET EMX will show you why)
|
---|
| 44 | ! else
|
---|
[6910] | 45 | ! if "$(CCENV)" == "WAT"
|
---|
| 46 | # (nmake and Watcom)
|
---|
| 47 | CCENV = WAT
|
---|
| 48 | MKFILE = WATN
|
---|
| 49 | DIREXT = .wat
|
---|
| 50 | WAT = 1
|
---|
| 51 | ! else
|
---|
[4718] | 52 | # default compiler
|
---|
| 53 | CCENV = VAC3
|
---|
[6910] | 54 | MKFILE = $(CCENV)
|
---|
[4718] | 55 | DIREXT =
|
---|
| 56 | VAC3 = 1
|
---|
[6910] | 57 | ! endif
|
---|
[6105] | 58 | ! endif
|
---|
[4718] | 59 | ! endif
|
---|
| 60 | ! endif
|
---|
| 61 | !else
|
---|
| 62 | # (wmake and Watcom)
|
---|
[6910] | 63 | WMAKE = 1
|
---|
[4718] | 64 | CCENV = WAT
|
---|
[6910] | 65 | MKFILE = $(CCENV)
|
---|
[4718] | 66 | DIREXT = .wat
|
---|
| 67 | WAT = 1
|
---|
| 68 | ! if "$(%DEBUG)" != ""
|
---|
| 69 | DEBUG = 1
|
---|
| 70 | ! endif
|
---|
| 71 | !endif
|
---|
| 72 |
|
---|
[10301] | 73 | #
|
---|
| 74 | # Altern configuration if we're making the custom build object library.
|
---|
| 75 | #
|
---|
| 76 | CUST =
|
---|
| 77 | !if "$(CUSTOMBUILD)" == "1"
|
---|
| 78 | ! ifndef LIBTARGET
|
---|
| 79 | ! ifndef PUBLICLIB
|
---|
| 80 | CUST = o
|
---|
| 81 | DIREXT2 = .cust
|
---|
| 82 | LIBTARGET = 1
|
---|
| 83 | PUBLICLIB = 1
|
---|
| 84 | WRC_PREFIX_RESOURCE=1
|
---|
| 85 | ! else
|
---|
| 86 | CUSTOMBUILD = 0
|
---|
| 87 | ! endif
|
---|
| 88 | ! else
|
---|
| 89 | CUSTOMBUILD = 0
|
---|
| 90 | ! endif
|
---|
| 91 | !endif
|
---|
[4718] | 92 |
|
---|
[10301] | 93 |
|
---|
[4718] | 94 | #
|
---|
| 95 | # Target directories.
|
---|
| 96 | # Both bin and lib directories are compiler dependent.
|
---|
| 97 | #
|
---|
| 98 | !ifndef ODIN32_BIN
|
---|
[6910] | 99 | ! ifdef DEBUG
|
---|
| 100 | ! ifndef PROFILE
|
---|
[9876] | 101 | ODIN32_BIN = $(ODIN32_BIN_)\Debug
|
---|
| 102 | ODIN32_BIN__= $(ODIN32_BIN_)\Debug
|
---|
[6910] | 103 | ! else
|
---|
[9876] | 104 | ODIN32_BIN = $(ODIN32_BIN_)\Profile
|
---|
| 105 | ODIN32_BIN__= $(ODIN32_BIN_)\Profile
|
---|
[6910] | 106 | ! endif
|
---|
| 107 | ! else
|
---|
| 108 | ! ifdef PROFILE
|
---|
[9876] | 109 | ODIN32_BIN = $(ODIN32_BIN_)\Profile
|
---|
| 110 | ODIN32_BIN__= $(ODIN32_BIN_)\Profile
|
---|
[6910] | 111 | ! else
|
---|
[9876] | 112 | ODIN32_BIN = $(ODIN32_BIN_)\Release
|
---|
| 113 | ODIN32_BIN__= $(ODIN32_BIN_)\Release
|
---|
[6910] | 114 | ! endif
|
---|
| 115 | ! endif
|
---|
[4718] | 116 | !endif
|
---|
[4770] | 117 |
|
---|
[4718] | 118 | !ifndef ODIN32_LIB
|
---|
[6910] | 119 | ! ifdef DEBUG
|
---|
| 120 | ! ifndef PROFILE
|
---|
[9876] | 121 | ODIN32_LIB = $(ODIN32_LIB_)\Debug
|
---|
| 122 | ODIN32_LIB__= $(ODIN32_LIB_)\Debug
|
---|
[6910] | 123 | ! else
|
---|
[9876] | 124 | ODIN32_LIB = $(ODIN32_LIB_)\Profile
|
---|
| 125 | ODIN32_LIB__= $(ODIN32_LIB_)\Profile
|
---|
[6910] | 126 | ! endif
|
---|
| 127 | ! else
|
---|
| 128 | ! ifdef PROFILE
|
---|
[9876] | 129 | ODIN32_LIB = $(ODIN32_LIB_)\Profile
|
---|
| 130 | ODIN32_LIB__= $(ODIN32_LIB_)\Profile
|
---|
[6910] | 131 | ! else
|
---|
[9876] | 132 | ODIN32_LIB = $(ODIN32_LIB_)\Release
|
---|
| 133 | ODIN32_LIB__= $(ODIN32_LIB_)\Release
|
---|
[6910] | 134 | ! endif
|
---|
| 135 | ! endif
|
---|
[4718] | 136 | !endif
|
---|
[4770] | 137 |
|
---|
[4718] | 138 | !ifndef OBJDIR
|
---|
[6910] | 139 | ! ifdef DEBUG
|
---|
| 140 | ! ifndef PROFILE
|
---|
[10301] | 141 | OBJDIR = .\bin\Debug$(DIREXT)$(DIREXT2)
|
---|
[6910] | 142 | ! else
|
---|
[10301] | 143 | OBJDIR = .\bin\Profile$(DIREXT)$(DIREXT2)
|
---|
[6910] | 144 | ! endif
|
---|
| 145 | ! else
|
---|
| 146 | ! ifdef PROFILE
|
---|
[10301] | 147 | OBJDIR = .\bin\Profile$(DIREXT)$(DIREXT2)
|
---|
[6910] | 148 | ! else
|
---|
[10301] | 149 | OBJDIR = .\bin\Release$(DIREXT)$(DIREXT2)
|
---|
[6910] | 150 | ! endif
|
---|
| 151 | ! endif
|
---|
[4718] | 152 | !endif
|
---|
| 153 |
|
---|
| 154 |
|
---|
| 155 | #
|
---|
| 156 | # Post include macro.
|
---|
| 157 | #
|
---|
| 158 | ODIN32_POST_INC = $(ODIN32_INCLUDE)/odin32.post.mk
|
---|
| 159 |
|
---|
| 160 |
|
---|
| 161 | #
|
---|
| 162 | # Common rules macro. (All makefiles should have these!)
|
---|
[6448] | 163 | # (Please don't change order of these rules!)
|
---|
[4718] | 164 | #
|
---|
[9876] | 165 | COMMONRULES = cleanall clean dep lib all nothing
|
---|
[4718] | 166 |
|
---|
| 167 |
|
---|
| 168 | #
|
---|
| 169 | # Include compiler environment.
|
---|
| 170 | #
|
---|
| 171 | !ifndef ONLY_TOOLS
|
---|
| 172 | !ifdef DEBUG
|
---|
[6910] | 173 | ! ifndef PROFILE
|
---|
| 174 | ! include $(ODIN32_INCLUDE)/odin32.dbg.$(MKFILE).mk
|
---|
| 175 | ! else
|
---|
| 176 | ! include $(ODIN32_INCLUDE)/odin32.profile.$(MKFILE).mk
|
---|
| 177 | ! endif
|
---|
[4718] | 178 | !else
|
---|
[6910] | 179 | ! ifdef PROFILE
|
---|
| 180 | ! include $(ODIN32_INCLUDE)/odin32.profile.$(MKFILE).mk
|
---|
| 181 | ! else
|
---|
| 182 | ! include $(ODIN32_INCLUDE)/odin32.rel.$(MKFILE).mk
|
---|
| 183 | ! endif
|
---|
[4718] | 184 | !endif
|
---|
| 185 | !endif
|
---|
| 186 |
|
---|
| 187 |
|
---|
| 188 | #
|
---|
[6896] | 189 | # Compiler environment modifications for custombuild.
|
---|
| 190 | #
|
---|
| 191 | !if "$(CUSTOMBUILD)" == "1"
|
---|
| 192 | DLLENTRY =
|
---|
| 193 | !endif
|
---|
| 194 |
|
---|
| 195 |
|
---|
| 196 | #
|
---|
[4718] | 197 | # Include system tools
|
---|
| 198 | #
|
---|
| 199 | !include $(ODIN32_INCLUDE)/odin32.tools.mk
|
---|
| 200 |
|
---|