win32.mak 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  1. # OpenDoors 6.20
  2. # (C) Copyright 1991 - 1997 by Brian Pirie. All Rights Reserved.
  3. #
  4. # Oct-2001 door32.sys/socket modifications by Rob Swindell (www.synchro.net)
  5. #
  6. #
  7. # File: Win32.mak
  8. #
  9. # Description: Makefile used to build the Win32 OpenDoors libraries from
  10. # the sources. Usage is described below.
  11. #
  12. # Revisions: Date Ver Who Change
  13. # ---------------------------------------------------------------
  14. # Oct 13, 1994 6.00 BP New file header format.
  15. # Oct 13, 1994 6.00 BP Made directories configurable.
  16. # Oct 13, 1994 6.00 BP Erase tlib-created backup file.
  17. # Oct 14, 1994 6.00 BP Added ODGen.h dependencies.
  18. # Oct 14, 1994 6.00 BP Added ODPlat.c module.
  19. # Oct 31, 1994 6.00 BP Added headers dependency constant.
  20. # Nov 01, 1994 6.00 BP Added ODUtil.c module.
  21. # Dec 31, 1994 6.00 BP Added -B option for Borland Cs.
  22. # Jan 01, 1995 6.00 BP Added ODKrnl.c, ODKrnl.h.
  23. # Jan 29, 1995 6.00 BP Added ODCmdLn.c.
  24. # Nov 16, 1995 6.00 BP Added ODInQue.c, and new headers.
  25. # Nov 21, 1995 6.00 BP Created ODInit1.c, ODInit2.c.
  26. # Dec 02, 1995 6.00 BP Added ODRes.h
  27. # Dec 02, 1995 6.00 BP Added ODFrame.c, ODFrame.h.
  28. # Dec 02, 1995 6.00 BP Added ODStat.h, ODSwap.h.
  29. # Dec 04, 1995 6.00 BP Changes for building Win32 version.
  30. # Dec 05, 1995 6.00 BP Split into makefiles for each platform
  31. # Dec 07, 1995 6.00 BP Added ODEdit.c.
  32. # Dec 21, 1995 6.00 BP Changes for building as DLL.
  33. # Jan 04, 1996 6.00 BP Added ODGetIn.c.
  34. # Feb 09, 1996 6.00 BP Renamed ODInit?.* to ODInEx?.*
  35. # Feb 19, 1996 6.00 BP Turned off OD_DEBUG
  36. # Feb 19, 1996 6.00 BP Changed version number to 6.00.
  37. # Mar 03, 1996 6.10 BP Begin version 6.10.
  38. # Oct 19, 2001 6.20 RS Added door32.sys and socket support.
  39. #
  40. ###############################################################################
  41. #
  42. # USAGE INFORMATION
  43. #
  44. ###############################################################################
  45. #
  46. # Command Line: make -fWin32.mak
  47. # or
  48. # nmake /f Win32.mak
  49. #
  50. ###############################################################################
  51. #
  52. # CONFIGURATION
  53. #
  54. # Customize this section of the makefile to provide the relevant information
  55. # for your compiler, assembler (if any) and build environment.
  56. #
  57. ###############################################################################
  58. # Compiler executable file name. Use:
  59. #
  60. # tcc - For Borland Turbo C and Turbo C++
  61. # bcc - For Borland C++
  62. # cl - For Microsoft compilers
  63. #
  64. CC=cl
  65. #
  66. #------------------------------------------------------------------------------
  67. #
  68. # Linker executable file name. Use:
  69. #
  70. # tlink - For Borland compilers
  71. # link - For Microsoft compilers
  72. #
  73. LINK=link
  74. #
  75. #------------------------------------------------------------------------------
  76. #
  77. # Resource compiler exectuable file name.
  78. #
  79. RC=rc
  80. #
  81. #------------------------------------------------------------------------------
  82. #
  83. # Win32 compiler command-line flags. Use:
  84. #
  85. # /c /W3 /D "WIN32" /D "_WINDOWS" - For Microsoft compilers
  86. #
  87. CFLAGS=/nologo /MT /W3 /GX /O2 /D "WIN32" /D "_WINDOWS" /c
  88. # /MTd /Zi - for debug
  89. #
  90. #------------------------------------------------------------------------------
  91. #
  92. # Link flags.
  93. #
  94. LINKFLAGS=kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib wsock32.lib\
  95. uuid.lib comctl32.lib /NOLOGO /DLL /INCREMENTAL:no\
  96. /MAP\
  97. # /DEBUG\
  98. /MACHINE:I386\
  99. /DEF:$(SOURCEDIR)"OpenDoor.def" /OUT:$(LIBDIR)"ODoors62.dll"\
  100. /IMPLIB:$(LIBDIR)"ODoorW.lib" /SUBSYSTEM:windows,4.0
  101. #
  102. #------------------------------------------------------------------------------
  103. #
  104. # Output directories. customize for your own preferences. Note that trailing
  105. # backslash (\) characters are required.
  106. #
  107. SOURCEDIR=.\ # Comments required
  108. ODHEADERDIR=.\ # in order to
  109. OBJDIR=.\ # was ..\obj # avoid line
  110. LIBDIR=.\ # was ..\lib # concatentation
  111. #
  112. ###############################################################################
  113. #
  114. # DEPENDENCIES
  115. #
  116. # You won't normally have to change anything after this point in this makefile.
  117. #
  118. ###############################################################################
  119. #
  120. # Define primary target.
  121. #
  122. TARGET=w
  123. all: $(LIBDIR)ODoors62.dll
  124. #
  125. #------------------------------------------------------------------------------
  126. #
  127. # Name of all headers.
  128. #
  129. HEADERS= $(HEADERDIR)ODCom.h\
  130. $(HEADERDIR)ODCore.h\
  131. $(HEADERDIR)ODFrame.h\
  132. $(HEADERDIR)ODGen.h\
  133. $(HEADERDIR)ODInEx.h\
  134. $(HEADERDIR)ODInQue.h\
  135. $(HEADERDIR)ODKrnl.h\
  136. $(HEADERDIR)ODPlat.h\
  137. $(HEADERDIR)ODRes.h\
  138. $(HEADERDIR)ODScrn.h\
  139. $(HEADERDIR)ODStat.h\
  140. $(HEADERDIR)ODSwap.h\
  141. $(HEADERDIR)ODTypes.h\
  142. $(HEADERDIR)ODUtil.h\
  143. $(HEADERDIR)OpenDoor.h
  144. #
  145. #------------------------------------------------------------------------------
  146. #
  147. #
  148. DEF_FILE=$(SOURCEDIR)OpenDoor.def
  149. #
  150. #------------------------------------------------------------------------------
  151. #
  152. # Build from C sources.
  153. #
  154. $(OBJDIR)odauto$(TARGET).obj : $(SOURCEDIR)odauto.c $(HEADERS)
  155. $(CC) $(CFLAGS) $(SOURCEDIR)odauto.c
  156. command /c erase $(OBJDIR)odauto$(TARGET).obj
  157. move odauto.obj $(OBJDIR)odauto$(TARGET).obj
  158. $(OBJDIR)odblock$(TARGET).obj : $(SOURCEDIR)odblock.c $(HEADERS)
  159. $(CC) $(CFLAGS) $(SOURCEDIR)odblock.c
  160. command /c erase $(OBJDIR)odblock$(TARGET).obj
  161. move odblock.obj $(OBJDIR)odblock$(TARGET).obj
  162. $(OBJDIR)odcfile$(TARGET).obj : $(SOURCEDIR)odcfile.c $(HEADERS)
  163. $(CC) $(CFLAGS) $(SOURCEDIR)odcfile.c
  164. command /c erase $(OBJDIR)odcfile$(TARGET).obj
  165. move odcfile.obj $(OBJDIR)odcfile$(TARGET).obj
  166. $(OBJDIR)odcmdln$(TARGET).obj : $(SOURCEDIR)odcmdln.c $(HEADERS)
  167. $(CC) $(CFLAGS) $(SOURCEDIR)odcmdln.c
  168. command /c erase $(OBJDIR)odcmdln$(TARGET).obj
  169. move odcmdln.obj $(OBJDIR)odcmdln$(TARGET).obj
  170. $(OBJDIR)odcom$(TARGET).obj : $(SOURCEDIR)odcom.c $(HEADERS)
  171. $(CC) $(CFLAGS) $(SOURCEDIR)odcom.c
  172. command /c erase $(OBJDIR)odcom$(TARGET).obj
  173. move odcom.obj $(OBJDIR)odcom$(TARGET).obj
  174. $(OBJDIR)odcore$(TARGET).obj : $(SOURCEDIR)odcore.c $(HEADERS)
  175. $(CC) $(CFLAGS) $(SOURCEDIR)odcore.c
  176. command /c erase $(OBJDIR)odcore$(TARGET).obj
  177. move odcore.obj $(OBJDIR)odcore$(TARGET).obj
  178. $(OBJDIR)oddrbox$(TARGET).obj : $(SOURCEDIR)oddrbox.c $(HEADERS)
  179. $(CC) $(CFLAGS) $(SOURCEDIR)oddrbox.c
  180. command /c erase $(OBJDIR)oddrbox$(TARGET).obj
  181. move oddrbox.obj $(OBJDIR)oddrbox$(TARGET).obj
  182. $(OBJDIR)odedit$(TARGET).obj : $(SOURCEDIR)odedit.c $(HEADERS)
  183. $(CC) $(CFLAGS) $(SOURCEDIR)odedit.c
  184. command /c erase $(OBJDIR)odedit$(TARGET).obj
  185. move odedit.obj $(OBJDIR)odedit$(TARGET).obj
  186. $(OBJDIR)odedstr$(TARGET).obj : $(SOURCEDIR)odedstr.c $(HEADERS)
  187. $(CC) $(CFLAGS) $(SOURCEDIR)odedstr.c
  188. command /c erase $(OBJDIR)odedstr$(TARGET).obj
  189. move odedstr.obj $(OBJDIR)odedstr$(TARGET).obj
  190. $(OBJDIR)odemu$(TARGET).obj : $(SOURCEDIR)odemu.c $(HEADERS)
  191. $(CC) $(CFLAGS) $(SOURCEDIR)odemu.c
  192. command /c erase $(OBJDIR)odemu$(TARGET).obj
  193. move odemu.obj $(OBJDIR)odemu$(TARGET).obj
  194. $(OBJDIR)odframe$(TARGET).obj : $(SOURCEDIR)odframe.c $(HEADERS)
  195. $(CC) $(CFLAGS) $(SOURCEDIR)odframe.c
  196. command /c erase $(OBJDIR)odframe$(TARGET).obj
  197. move odframe.obj $(OBJDIR)odframe$(TARGET).obj
  198. $(OBJDIR)odgetin$(TARGET).obj : $(SOURCEDIR)odgetin.c $(HEADERS)
  199. $(CC) $(CFLAGS) $(SOURCEDIR)odgetin.c
  200. command /c erase $(OBJDIR)odgetin$(TARGET).obj
  201. move odgetin.obj $(OBJDIR)odgetin$(TARGET).obj
  202. $(OBJDIR)odgraph$(TARGET).obj : $(SOURCEDIR)odgraph.c $(HEADERS)
  203. $(CC) $(CFLAGS) $(SOURCEDIR)odgraph.c
  204. command /c erase $(OBJDIR)odgraph$(TARGET).obj
  205. move odgraph.obj $(OBJDIR)odgraph$(TARGET).obj
  206. $(OBJDIR)odinex1$(TARGET).obj : $(SOURCEDIR)odinex1.c $(HEADERS)
  207. $(CC) $(CFLAGS) $(SOURCEDIR)odinex1.c
  208. command /c erase $(OBJDIR)odinex1$(TARGET).obj
  209. move odinex1.obj $(OBJDIR)odinex1$(TARGET).obj
  210. $(OBJDIR)odinex2$(TARGET).obj : $(SOURCEDIR)odinex2.c $(HEADERS)
  211. $(CC) $(CFLAGS) $(SOURCEDIR)odinex2.c
  212. command /c erase $(OBJDIR)odinex2$(TARGET).obj
  213. move odinex2.obj $(OBJDIR)odinex2$(TARGET).obj
  214. $(OBJDIR)odinque$(TARGET).obj : $(SOURCEDIR)odinque.c $(HEADERS)
  215. $(CC) $(CFLAGS) $(SOURCEDIR)odinque.c
  216. command /c erase $(OBJDIR)odinque$(TARGET).obj
  217. move odinque.obj $(OBJDIR)odinque$(TARGET).obj
  218. $(OBJDIR)odkrnl$(TARGET).obj : $(SOURCEDIR)odkrnl.c $(HEADERS)
  219. $(CC) $(CFLAGS) $(SOURCEDIR)odkrnl.c
  220. command /c erase $(OBJDIR)odkrnl$(TARGET).obj
  221. move odkrnl.obj $(OBJDIR)odkrnl$(TARGET).obj
  222. $(OBJDIR)odlist$(TARGET).obj : $(SOURCEDIR)odlist.c $(HEADERS)
  223. $(CC) $(CFLAGS) $(SOURCEDIR)odlist.c
  224. command /c erase $(OBJDIR)odlist$(TARGET).obj
  225. move odlist.obj $(OBJDIR)odlist$(TARGET).obj
  226. $(OBJDIR)odlog$(TARGET).obj : $(SOURCEDIR)odlog.c $(HEADERS)
  227. $(CC) $(CFLAGS) $(SOURCEDIR)odlog.c
  228. command /c erase $(OBJDIR)odlog$(TARGET).obj
  229. move odlog.obj $(OBJDIR)odlog$(TARGET).obj
  230. $(OBJDIR)odmulti$(TARGET).obj : $(SOURCEDIR)odmulti.c $(HEADERS)
  231. $(CC) $(CFLAGS) $(SOURCEDIR)odmulti.c
  232. command /c erase $(OBJDIR)odmulti$(TARGET).obj
  233. move odmulti.obj $(OBJDIR)odmulti$(TARGET).obj
  234. $(OBJDIR)odplat$(TARGET).obj : $(SOURCEDIR)odplat.c $(HEADERS)
  235. $(CC) $(CFLAGS) $(SOURCEDIR)odplat.c
  236. command /c erase $(OBJDIR)odplat$(TARGET).obj
  237. move odplat.obj $(OBJDIR)odplat$(TARGET).obj
  238. $(OBJDIR)odpcb$(TARGET).obj : $(SOURCEDIR)odpcb.c $(HEADERS)
  239. $(CC) $(CFLAGS) $(SOURCEDIR)odpcb.c
  240. command /c erase $(OBJDIR)odpcb$(TARGET).obj
  241. move odpcb.obj $(OBJDIR)odpcb$(TARGET).obj
  242. $(OBJDIR)odpopup$(TARGET).obj : $(SOURCEDIR)odpopup.c $(HEADERS)
  243. $(CC) $(CFLAGS) $(SOURCEDIR)odpopup.c
  244. command /c erase $(OBJDIR)odpopup$(TARGET).obj
  245. move odpopup.obj $(OBJDIR)odpopup$(TARGET).obj
  246. $(OBJDIR)odprntf$(TARGET).obj : $(SOURCEDIR)odprntf.c $(HEADERS)
  247. $(CC) $(CFLAGS) $(SOURCEDIR)odprntf.c
  248. command /c erase $(OBJDIR)odprntf$(TARGET).obj
  249. move odprntf.obj $(OBJDIR)odprntf$(TARGET).obj
  250. $(OBJDIR)odra$(TARGET).obj : $(SOURCEDIR)odra.c $(HEADERS)
  251. $(CC) $(CFLAGS) $(SOURCEDIR)odra.c
  252. command /c erase $(OBJDIR)odra$(TARGET).obj
  253. move odra.obj $(OBJDIR)odra$(TARGET).obj
  254. $(OBJDIR)odscrn$(TARGET).obj : $(SOURCEDIR)odscrn.c $(HEADERS)
  255. $(CC) $(CFLAGS) $(SOURCEDIR)odscrn.c
  256. command /c erase $(OBJDIR)odscrn$(TARGET).obj
  257. move odscrn.obj $(OBJDIR)odscrn$(TARGET).obj
  258. $(OBJDIR)odspawn$(TARGET).obj : $(SOURCEDIR)odspawn.c $(HEADERS)
  259. $(CC) $(CFLAGS) $(SOURCEDIR)odspawn.c
  260. command /c erase $(OBJDIR)odspawn$(TARGET).obj
  261. move odspawn.obj $(OBJDIR)odspawn$(TARGET).obj
  262. $(OBJDIR)odstand$(TARGET).obj : $(SOURCEDIR)odstand.c $(HEADERS)
  263. $(CC) $(CFLAGS) $(SOURCEDIR)odstand.c
  264. command /c erase $(OBJDIR)odstand$(TARGET).obj
  265. move odstand.obj $(OBJDIR)odstand$(TARGET).obj
  266. $(OBJDIR)odstat$(TARGET).obj : $(SOURCEDIR)odstat.c $(HEADERS)
  267. $(CC) $(CFLAGS) $(SOURCEDIR)odstat.c
  268. command /c erase $(OBJDIR)odstat$(TARGET).obj
  269. move odstat.obj $(OBJDIR)odstat$(TARGET).obj
  270. # This file (odsys.c) wasn't included in 6.1.1 source <shrug>
  271. #$(OBJDIR)odsys$(TARGET).obj : $(SOURCEDIR)odsys.c $(HEADERS)
  272. # $(CC) $(CFLAGS) $(SOURCEDIR)odsys.c
  273. # command /c erase $(OBJDIR)odsys$(TARGET).obj
  274. # move odsys.obj $(OBJDIR)odsys$(TARGET).obj
  275. $(OBJDIR)odutil$(TARGET).obj : $(SOURCEDIR)odutil.c $(HEADERS)
  276. $(CC) $(CFLAGS) $(SOURCEDIR)odutil.c
  277. command /c erase $(OBJDIR)odutil$(TARGET).obj
  278. move odutil.obj $(OBJDIR)odutil$(TARGET).obj
  279. $(OBJDIR)odwcat$(TARGET).obj : $(SOURCEDIR)odwcat.c $(HEADERS)
  280. $(CC) $(CFLAGS) $(SOURCEDIR)odwcat.c
  281. command /c erase $(OBJDIR)odwcat$(TARGET).obj
  282. move odwcat.obj $(OBJDIR)odwcat$(TARGET).obj
  283. $(OBJDIR)odwin$(TARGET).obj : $(SOURCEDIR)odwin.c $(HEADERS)
  284. $(CC) $(CFLAGS) $(SOURCEDIR)odwin.c
  285. command /c erase $(OBJDIR)odwin$(TARGET).obj
  286. move odwin.obj $(OBJDIR)odwin$(TARGET).obj
  287. #
  288. #------------------------------------------------------------------------------
  289. #
  290. # Build from resource script.
  291. #
  292. $(OBJDIR)ODoor$(TARGET).res: $(SOURCEDIR)ODRes.rc
  293. $(RC) $(SOURCEDIR)ODRes.rc
  294. command /c erase $(LIBDIR)ODoor$(TARGET).res
  295. move $(SOURCEDIR)ODRes.res $(OBJDIR)ODoor$(TARGET).res
  296. #
  297. #------------------------------------------------------------------------------
  298. #
  299. # Build DLL from objects.
  300. #
  301. OBJECTS= $(OBJDIR)odauto$(TARGET).obj\
  302. $(OBJDIR)odblock$(TARGET).obj\
  303. $(OBJDIR)odcfile$(TARGET).obj\
  304. $(OBJDIR)odcmdln$(TARGET).obj\
  305. $(OBJDIR)odcom$(TARGET).obj\
  306. $(OBJDIR)odcore$(TARGET).obj\
  307. $(OBJDIR)oddrbox$(TARGET).obj\
  308. $(OBJDIR)odedit$(TARGET).obj\
  309. $(OBJDIR)odedstr$(TARGET).obj\
  310. $(OBJDIR)odemu$(TARGET).obj\
  311. $(OBJDIR)odframe$(TARGET).obj\
  312. $(OBJDIR)odgetin$(TARGET).obj\
  313. $(OBJDIR)odgraph$(TARGET).obj\
  314. $(OBJDIR)odinex1$(TARGET).obj\
  315. $(OBJDIR)odinex2$(TARGET).obj\
  316. $(OBJDIR)odinque$(TARGET).obj\
  317. $(OBJDIR)odkrnl$(TARGET).obj\
  318. $(OBJDIR)odlist$(TARGET).obj\
  319. $(OBJDIR)odlog$(TARGET).obj\
  320. $(OBJDIR)odmulti$(TARGET).obj\
  321. $(OBJDIR)odplat$(TARGET).obj\
  322. $(OBJDIR)odpcb$(TARGET).obj\
  323. $(OBJDIR)odpopup$(TARGET).obj\
  324. $(OBJDIR)odprntf$(TARGET).obj\
  325. $(OBJDIR)odra$(TARGET).obj\
  326. $(OBJDIR)odscrn$(TARGET).obj\
  327. $(OBJDIR)odspawn$(TARGET).obj\
  328. $(OBJDIR)odstand$(TARGET).obj\
  329. $(OBJDIR)odstat$(TARGET).obj\
  330. # $(OBJDIR)odsys$(TARGET).obj\ this file is missing
  331. $(OBJDIR)odutil$(TARGET).obj\
  332. $(OBJDIR)odwcat$(TARGET).obj\
  333. $(OBJDIR)odwin$(TARGET).obj\
  334. $(OBJDIR)ODoor$(TARGET).res
  335. $(LIBDIR)ODoors62.dll : $(DEF_FILE) $(OBJECTS)
  336. $(LINK) @<<
  337. $(LINKFLAGS) $(OBJECTS)
  338. <<
  339. #
  340. #------------------------------------------------------------------------------