Advertisement
Guest User

OS/2 patch for SDLMAME v0.164

a guest
Aug 2nd, 2015
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 70.88 KB | None | 0 0
  1. diff -uNr -b makefile.org makefile
  2. --- makefile.org 2015-07-29 10:23:18.000000000 +0900
  3. +++ makefile 2015-07-30 16:33:06.000000000 +0900
  4. @@ -144,6 +144,10 @@
  5. ifeq ($(firstword $(filter Haiku,$(UNAME))),Haiku)
  6. OS := haiku
  7. endif
  8. +ifeq ($(firstword $(filter OS/2,$(UNAME))),OS/2)
  9. +OS := os2
  10. +GENIEOS := os2
  11. +endif
  12. ifndef OS
  13. $(error Unable to detect OS from uname -a: $(UNAME))
  14. endif
  15. @@ -308,6 +312,10 @@
  16. ifeq ($(TARGETOS),macosx)
  17. OSD := sdl
  18. endif
  19. +
  20. +ifeq ($(TARGETOS),os2)
  21. +OSD := sdl
  22. +endif
  23. endif
  24.  
  25. #-------------------------------------------------
  26. @@ -676,6 +684,9 @@
  27. ifeq (/bin,$(findstring /bin,$(SHELL)))
  28. SHELLTYPE := posix
  29. endif
  30. +ifeq (/bin,$(findstring /bin,$(MAKESHELL)))
  31. + SHELLTYPE := posix
  32. +endif
  33.  
  34. ifeq (posix,$(SHELLTYPE))
  35. MKDIR = $(SILENT) mkdir -p "$(1)"
  36. @@ -1031,6 +1042,22 @@
  37.  
  38.  
  39. #-------------------------------------------------
  40. +# gmake-os2
  41. +#-------------------------------------------------
  42. +
  43. +
  44. +$(PROJECTDIR)/gmake-os2/Makefile: makefile $(SCRIPTS) $(GENIE)
  45. + $(SILENT) $(GENIE) $(PARAMS) --gcc=os2 --gcc_version=$(GCC_VERSION) gmake
  46. +
  47. +.PHONY: os2
  48. +os2: os2_x86
  49. +
  50. +.PHONY: os2_x86
  51. +os2_x86: generate $(PROJECTDIR)/gmake-os2/Makefile
  52. + $(SILENT) $(MAKE) -C $(PROJECTDIR)/gmake-os2 config=$(CONFIG)32
  53. +
  54. +
  55. +#-------------------------------------------------
  56. # Clean/bootstrap
  57. #-------------------------------------------------
  58.  
  59. diff -uNr -b 3rdparty/genie/build/gmake.os2/genie.make.org 3rdparty/genie/build/gmake.os2/genie.make
  60. --- 3rdparty/genie/build/gmake.os2/genie.make.org 2015-07-30 16:41:20.000000000 +0900
  61. +++ 3rdparty/genie/build/gmake.os2/genie.make 2015-07-30 16:33:06.000000000 +0900
  62. @@ -0,0 +1,461 @@
  63. +# GNU Make project makefile autogenerated by GENie
  64. +ifndef config
  65. + config=release
  66. +endif
  67. +
  68. +ifndef verbose
  69. + SILENT = @
  70. +endif
  71. +
  72. +SHELLTYPE := msdos
  73. +ifeq (,$(ComSpec)$(COMSPEC))
  74. + SHELLTYPE := posix
  75. +endif
  76. +ifeq (/bin,$(findstring /bin,$(SHELL)))
  77. + SHELLTYPE := posix
  78. +endif
  79. +ifeq (/bin,$(findstring /bin,$(MAKESHELL)))
  80. + SHELLTYPE := posix
  81. +endif
  82. +
  83. +ifeq (posix,$(SHELLTYPE))
  84. + MKDIR = $(SILENT) mkdir -p "$(1)"
  85. + COPY = $(SILENT) cp -fR "$(1)" "$(2)"
  86. + RM= $(SILENT) rm -f "$(1)"
  87. +else
  88. + MKDIR = $(SILENT) mkdir "$(subst /,\\,$(1))" 2> nul || exit 0
  89. + COPY = $(SILENT) copy /Y "$(subst /,\\,$(1))" "$(subst /,\\,$(2))"
  90. + RM = $(SILENT) del /F "$(subst /,\\,$(1))" 2> nul || exit 0
  91. +endif
  92. +
  93. +CC = gcc
  94. +CXX = g++
  95. +AR = ar
  96. +
  97. +ifndef RESCOMP
  98. + ifdef WINDRES
  99. + RESCOMP = $(WINDRES)
  100. + else
  101. + RESCOMP = windres
  102. + endif
  103. +endif
  104. +
  105. +ifeq ($(config),release)
  106. + OBJDIR = obj/Release
  107. + TARGETDIR = ../../bin/os2
  108. + override TARGET = $(TARGETDIR)/genie.exe
  109. + DEFINES += -DNDEBUG -DLUA_COMPAT_MODULE -DLUA_USE_POSIX -DLUA_USE_DLOPEN
  110. + INCLUDES += -I../../src/host/lua-5.3.0/src
  111. + ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
  112. + ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os
  113. + ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os
  114. + ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os
  115. + ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
  116. + ALL_LDFLAGS += $(LDFLAGS) -L. -s
  117. + LDDEPS +=
  118. + LIBS += $(LDDEPS)
  119. + LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
  120. + OBJECTS := \
  121. + $(OBJDIR)/src/host/os_mkdir.o \
  122. + $(OBJDIR)/src/host/os_stat.o \
  123. + $(OBJDIR)/src/host/os_isdir.o \
  124. + $(OBJDIR)/src/host/os_rmdir.o \
  125. + $(OBJDIR)/src/host/os_uuid.o \
  126. + $(OBJDIR)/src/host/string_endswith.o \
  127. + $(OBJDIR)/src/host/os_chdir.o \
  128. + $(OBJDIR)/src/host/os_getversion.o \
  129. + $(OBJDIR)/src/host/path_isabsolute.o \
  130. + $(OBJDIR)/src/host/scripts.o \
  131. + $(OBJDIR)/src/host/premake.o \
  132. + $(OBJDIR)/src/host/os_getcwd.o \
  133. + $(OBJDIR)/src/host/premake_main.o \
  134. + $(OBJDIR)/src/host/os_ticks.o \
  135. + $(OBJDIR)/src/host/string_hash.o \
  136. + $(OBJDIR)/src/host/os_is64bit.o \
  137. + $(OBJDIR)/src/host/os_match.o \
  138. + $(OBJDIR)/src/host/os_isfile.o \
  139. + $(OBJDIR)/src/host/os_copyfile.o \
  140. + $(OBJDIR)/src/host/os_pathsearch.o \
  141. + $(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \
  142. + $(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \
  143. + $(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \
  144. + $(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \
  145. + $(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \
  146. + $(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \
  147. + $(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \
  148. + $(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \
  149. + $(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \
  150. + $(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \
  151. + $(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \
  152. + $(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \
  153. + $(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \
  154. + $(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \
  155. + $(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \
  156. + $(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \
  157. + $(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \
  158. + $(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \
  159. + $(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \
  160. + $(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \
  161. + $(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \
  162. + $(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \
  163. + $(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \
  164. + $(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \
  165. + $(OBJDIR)/src/host/lua-5.3.0/src/linit.o \
  166. + $(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \
  167. + $(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \
  168. + $(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \
  169. + $(OBJDIR)/src/host/lua-5.3.0/src/llex.o \
  170. + $(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \
  171. + $(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \
  172. + $(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \
  173. + $(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \
  174. +
  175. + define PREBUILDCMDS
  176. + endef
  177. + define PRELINKCMDS
  178. + endef
  179. + define POSTBUILDCMDS
  180. + endef
  181. +endif
  182. +
  183. +ifeq ($(config),debug)
  184. + OBJDIR = obj/Debug
  185. + TARGETDIR = ../../bin/os2
  186. + override TARGET = $(TARGETDIR)/genie.exe
  187. + DEFINES += -D_DEBUG -DLUA_COMPAT_MODULE -DLUA_USE_POSIX -DLUA_USE_DLOPEN
  188. + INCLUDES += -I../../src/host/lua-5.3.0/src
  189. + ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
  190. + ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g
  191. + ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g
  192. + ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g
  193. + ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
  194. + ALL_LDFLAGS += $(LDFLAGS) -L.
  195. + LDDEPS +=
  196. + LIBS += $(LDDEPS)
  197. + LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
  198. + OBJECTS := \
  199. + $(OBJDIR)/src/host/os_mkdir.o \
  200. + $(OBJDIR)/src/host/os_stat.o \
  201. + $(OBJDIR)/src/host/os_isdir.o \
  202. + $(OBJDIR)/src/host/os_rmdir.o \
  203. + $(OBJDIR)/src/host/os_uuid.o \
  204. + $(OBJDIR)/src/host/string_endswith.o \
  205. + $(OBJDIR)/src/host/os_chdir.o \
  206. + $(OBJDIR)/src/host/os_getversion.o \
  207. + $(OBJDIR)/src/host/path_isabsolute.o \
  208. + $(OBJDIR)/src/host/scripts.o \
  209. + $(OBJDIR)/src/host/premake.o \
  210. + $(OBJDIR)/src/host/os_getcwd.o \
  211. + $(OBJDIR)/src/host/premake_main.o \
  212. + $(OBJDIR)/src/host/os_ticks.o \
  213. + $(OBJDIR)/src/host/string_hash.o \
  214. + $(OBJDIR)/src/host/os_is64bit.o \
  215. + $(OBJDIR)/src/host/os_match.o \
  216. + $(OBJDIR)/src/host/os_isfile.o \
  217. + $(OBJDIR)/src/host/os_copyfile.o \
  218. + $(OBJDIR)/src/host/os_pathsearch.o \
  219. + $(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \
  220. + $(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \
  221. + $(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \
  222. + $(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \
  223. + $(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \
  224. + $(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \
  225. + $(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \
  226. + $(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \
  227. + $(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \
  228. + $(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \
  229. + $(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \
  230. + $(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \
  231. + $(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \
  232. + $(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \
  233. + $(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \
  234. + $(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \
  235. + $(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \
  236. + $(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \
  237. + $(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \
  238. + $(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \
  239. + $(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \
  240. + $(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \
  241. + $(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \
  242. + $(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \
  243. + $(OBJDIR)/src/host/lua-5.3.0/src/linit.o \
  244. + $(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \
  245. + $(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \
  246. + $(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \
  247. + $(OBJDIR)/src/host/lua-5.3.0/src/llex.o \
  248. + $(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \
  249. + $(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \
  250. + $(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \
  251. + $(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \
  252. +
  253. + define PREBUILDCMDS
  254. + endef
  255. + define PRELINKCMDS
  256. + endef
  257. + define POSTBUILDCMDS
  258. + endef
  259. +endif
  260. +
  261. +OBJDIRS := \
  262. + $(OBJDIR) \
  263. + $(OBJDIR)/src/host/lua-5.3.0/src \
  264. + $(OBJDIR)/src/host \
  265. +
  266. +RESOURCES := \
  267. +
  268. +.PHONY: clean prebuild prelink
  269. +
  270. +all: $(TARGETDIR) $(OBJDIRS) prebuild prelink $(TARGET)
  271. + @:
  272. +
  273. +$(TARGET): $(GCH) $(OBJECTS) $(LDDEPS) $(RESOURCES)
  274. + @echo Linking genie
  275. + $(SILENT) $(LINKCMD)
  276. + $(POSTBUILDCMDS)
  277. +
  278. +$(TARGETDIR):
  279. + @echo Creating $(TARGETDIR)
  280. + -$(call MKDIR,$(TARGETDIR))
  281. +
  282. +$(OBJDIRS):
  283. + @echo Creating $(@)
  284. + -$(call MKDIR,$@)
  285. +
  286. +clean:
  287. + @echo Cleaning genie
  288. +ifeq (posix,$(SHELLTYPE))
  289. + $(SILENT) rm -f $(TARGET)
  290. + $(SILENT) rm -rf $(OBJDIR)
  291. +else
  292. + $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET))
  293. + $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR))
  294. +endif
  295. +
  296. +prebuild:
  297. + $(PREBUILDCMDS)
  298. +
  299. +prelink:
  300. + $(PRELINKCMDS)
  301. +
  302. +ifneq (,$(PCH))
  303. +$(GCH): $(PCH)
  304. + @echo $(notdir $<)
  305. + $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
  306. +endif
  307. +
  308. +$(OBJDIR)/src/host/os_mkdir.o: ../../src/host/os_mkdir.c
  309. + @echo $(notdir $<)
  310. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  311. +
  312. +$(OBJDIR)/src/host/os_stat.o: ../../src/host/os_stat.c
  313. + @echo $(notdir $<)
  314. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  315. +
  316. +$(OBJDIR)/src/host/os_isdir.o: ../../src/host/os_isdir.c
  317. + @echo $(notdir $<)
  318. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  319. +
  320. +$(OBJDIR)/src/host/os_rmdir.o: ../../src/host/os_rmdir.c
  321. + @echo $(notdir $<)
  322. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  323. +
  324. +$(OBJDIR)/src/host/os_uuid.o: ../../src/host/os_uuid.c
  325. + @echo $(notdir $<)
  326. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  327. +
  328. +$(OBJDIR)/src/host/string_endswith.o: ../../src/host/string_endswith.c
  329. + @echo $(notdir $<)
  330. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  331. +
  332. +$(OBJDIR)/src/host/os_chdir.o: ../../src/host/os_chdir.c
  333. + @echo $(notdir $<)
  334. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  335. +
  336. +$(OBJDIR)/src/host/os_getversion.o: ../../src/host/os_getversion.c
  337. + @echo $(notdir $<)
  338. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  339. +
  340. +$(OBJDIR)/src/host/path_isabsolute.o: ../../src/host/path_isabsolute.c
  341. + @echo $(notdir $<)
  342. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  343. +
  344. +$(OBJDIR)/src/host/scripts.o: ../../src/host/scripts.c
  345. + @echo $(notdir $<)
  346. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  347. +
  348. +$(OBJDIR)/src/host/premake.o: ../../src/host/premake.c
  349. + @echo $(notdir $<)
  350. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  351. +
  352. +$(OBJDIR)/src/host/os_getcwd.o: ../../src/host/os_getcwd.c
  353. + @echo $(notdir $<)
  354. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  355. +
  356. +$(OBJDIR)/src/host/premake_main.o: ../../src/host/premake_main.c
  357. + @echo $(notdir $<)
  358. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  359. +
  360. +$(OBJDIR)/src/host/os_ticks.o: ../../src/host/os_ticks.c
  361. + @echo $(notdir $<)
  362. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  363. +
  364. +$(OBJDIR)/src/host/string_hash.o: ../../src/host/string_hash.c
  365. + @echo $(notdir $<)
  366. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  367. +
  368. +$(OBJDIR)/src/host/os_is64bit.o: ../../src/host/os_is64bit.c
  369. + @echo $(notdir $<)
  370. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  371. +
  372. +$(OBJDIR)/src/host/os_match.o: ../../src/host/os_match.c
  373. + @echo $(notdir $<)
  374. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  375. +
  376. +$(OBJDIR)/src/host/os_isfile.o: ../../src/host/os_isfile.c
  377. + @echo $(notdir $<)
  378. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  379. +
  380. +$(OBJDIR)/src/host/os_copyfile.o: ../../src/host/os_copyfile.c
  381. + @echo $(notdir $<)
  382. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  383. +
  384. +$(OBJDIR)/src/host/os_pathsearch.o: ../../src/host/os_pathsearch.c
  385. + @echo $(notdir $<)
  386. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  387. +
  388. +$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o: ../../src/host/lua-5.3.0/src/lobject.c
  389. + @echo $(notdir $<)
  390. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  391. +
  392. +$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o: ../../src/host/lua-5.3.0/src/lparser.c
  393. + @echo $(notdir $<)
  394. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  395. +
  396. +$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o: ../../src/host/lua-5.3.0/src/lundump.c
  397. + @echo $(notdir $<)
  398. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  399. +
  400. +$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o: ../../src/host/lua-5.3.0/src/lfunc.c
  401. + @echo $(notdir $<)
  402. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  403. +
  404. +$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o: ../../src/host/lua-5.3.0/src/lcorolib.c
  405. + @echo $(notdir $<)
  406. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  407. +
  408. +$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o: ../../src/host/lua-5.3.0/src/liolib.c
  409. + @echo $(notdir $<)
  410. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  411. +
  412. +$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o: ../../src/host/lua-5.3.0/src/ltablib.c
  413. + @echo $(notdir $<)
  414. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  415. +
  416. +$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o: ../../src/host/lua-5.3.0/src/ldblib.c
  417. + @echo $(notdir $<)
  418. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  419. +
  420. +$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o: ../../src/host/lua-5.3.0/src/ldebug.c
  421. + @echo $(notdir $<)
  422. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  423. +
  424. +$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o: ../../src/host/lua-5.3.0/src/lmathlib.c
  425. + @echo $(notdir $<)
  426. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  427. +
  428. +$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o: ../../src/host/lua-5.3.0/src/lctype.c
  429. + @echo $(notdir $<)
  430. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  431. +
  432. +$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o: ../../src/host/lua-5.3.0/src/lutf8lib.c
  433. + @echo $(notdir $<)
  434. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  435. +
  436. +$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o: ../../src/host/lua-5.3.0/src/lauxlib.c
  437. + @echo $(notdir $<)
  438. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  439. +
  440. +$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o: ../../src/host/lua-5.3.0/src/lstate.c
  441. + @echo $(notdir $<)
  442. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  443. +
  444. +$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o: ../../src/host/lua-5.3.0/src/lgc.c
  445. + @echo $(notdir $<)
  446. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  447. +
  448. +$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o: ../../src/host/lua-5.3.0/src/ltable.c
  449. + @echo $(notdir $<)
  450. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  451. +
  452. +$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o: ../../src/host/lua-5.3.0/src/lbitlib.c
  453. + @echo $(notdir $<)
  454. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  455. +
  456. +$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o: ../../src/host/lua-5.3.0/src/lapi.c
  457. + @echo $(notdir $<)
  458. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  459. +
  460. +$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o: ../../src/host/lua-5.3.0/src/lmem.c
  461. + @echo $(notdir $<)
  462. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  463. +
  464. +$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o: ../../src/host/lua-5.3.0/src/lvm.c
  465. + @echo $(notdir $<)
  466. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  467. +
  468. +$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o: ../../src/host/lua-5.3.0/src/lcode.c
  469. + @echo $(notdir $<)
  470. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  471. +
  472. +$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o: ../../src/host/lua-5.3.0/src/lzio.c
  473. + @echo $(notdir $<)
  474. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  475. +
  476. +$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o: ../../src/host/lua-5.3.0/src/lstrlib.c
  477. + @echo $(notdir $<)
  478. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  479. +
  480. +$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o: ../../src/host/lua-5.3.0/src/lbaselib.c
  481. + @echo $(notdir $<)
  482. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  483. +
  484. +$(OBJDIR)/src/host/lua-5.3.0/src/linit.o: ../../src/host/lua-5.3.0/src/linit.c
  485. + @echo $(notdir $<)
  486. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  487. +
  488. +$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o: ../../src/host/lua-5.3.0/src/ldo.c
  489. + @echo $(notdir $<)
  490. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  491. +
  492. +$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o: ../../src/host/lua-5.3.0/src/lstring.c
  493. + @echo $(notdir $<)
  494. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  495. +
  496. +$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o: ../../src/host/lua-5.3.0/src/ldump.c
  497. + @echo $(notdir $<)
  498. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  499. +
  500. +$(OBJDIR)/src/host/lua-5.3.0/src/llex.o: ../../src/host/lua-5.3.0/src/llex.c
  501. + @echo $(notdir $<)
  502. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  503. +
  504. +$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o: ../../src/host/lua-5.3.0/src/lopcodes.c
  505. + @echo $(notdir $<)
  506. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  507. +
  508. +$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o: ../../src/host/lua-5.3.0/src/loslib.c
  509. + @echo $(notdir $<)
  510. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  511. +
  512. +$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o: ../../src/host/lua-5.3.0/src/loadlib.c
  513. + @echo $(notdir $<)
  514. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  515. +
  516. +$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o: ../../src/host/lua-5.3.0/src/ltm.c
  517. + @echo $(notdir $<)
  518. + $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
  519. +
  520. +-include $(OBJECTS:%.o=%.d)
  521. +ifneq (,$(PCH))
  522. + -include $(OBJDIR)/$(notdir $(PCH)).d
  523. +endif
  524. diff -uNr -b 3rdparty/genie/build/gmake.os2/Makefile.org 3rdparty/genie/build/gmake.os2/Makefile
  525. --- 3rdparty/genie/build/gmake.os2/Makefile.org 2015-07-30 16:41:24.000000000 +0900
  526. +++ 3rdparty/genie/build/gmake.os2/Makefile 2015-07-30 16:33:06.000000000 +0900
  527. @@ -0,0 +1,34 @@
  528. +# GNU Make solution makefile autogenerated by GENie
  529. +# Type "make help" for usage help
  530. +
  531. +ifndef config
  532. + config=release
  533. +endif
  534. +export config
  535. +
  536. +PROJECTS := genie
  537. +
  538. +.PHONY: all clean help $(PROJECTS)
  539. +
  540. +all: $(PROJECTS)
  541. +
  542. +genie:
  543. + @echo "==== Building genie ($(config)) ===="
  544. + @${MAKE} --no-print-directory -C . -f genie.make
  545. +
  546. +clean:
  547. + @${MAKE} --no-print-directory -C . -f genie.make clean
  548. +
  549. +help:
  550. + @echo "Usage: make [config=name] [target]"
  551. + @echo ""
  552. + @echo "CONFIGURATIONS:"
  553. + @echo " release"
  554. + @echo " debug"
  555. + @echo ""
  556. + @echo "TARGETS:"
  557. + @echo " all (default)"
  558. + @echo " clean"
  559. + @echo " genie"
  560. + @echo ""
  561. + @echo "For more information, see http://industriousone.com/premake/quick-start"
  562. diff -uNr -b 3rdparty/genie/src/actions/make/make_cpp.lua.org 3rdparty/genie/src/actions/make/make_cpp.lua
  563. --- 3rdparty/genie/src/actions/make/make_cpp.lua.org 2015-07-29 10:23:10.000000000 +0900
  564. +++ 3rdparty/genie/src/actions/make/make_cpp.lua 2015-07-30 16:33:06.000000000 +0900
  565. @@ -228,6 +228,9 @@
  566. _p('ifeq (/bin,$(findstring /bin,$(SHELL)))')
  567. _p(' SHELLTYPE := posix')
  568. _p('endif')
  569. + _p('ifeq (/bin,$(findstring /bin,$(MAKESHELL)))')
  570. + _p(' SHELLTYPE := posix')
  571. + _p('endif')
  572. _p('')
  573.  
  574. _p('ifeq (posix,$(SHELLTYPE))')
  575. diff -uNr -b 3rdparty/genie/src/actions/make/make_csharp.lua.org 3rdparty/genie/src/actions/make/make_csharp.lua
  576. --- 3rdparty/genie/src/actions/make/make_csharp.lua.org 2015-07-29 10:23:10.000000000 +0900
  577. +++ 3rdparty/genie/src/actions/make/make_csharp.lua 2015-07-30 16:33:06.000000000 +0900
  578. @@ -104,6 +104,9 @@
  579. _p('ifeq (/bin,$(findstring /bin,$(SHELL)))')
  580. _p(' SHELLTYPE := posix')
  581. _p('endif')
  582. + _p('ifeq (/bin,$(findstring /bin,$(MAKESHELL)))')
  583. + _p(' SHELLTYPE := posix')
  584. + _p('endif')
  585. _p('')
  586.  
  587. _p('ifeq (posix,$(SHELLTYPE))')
  588. @@ -173,6 +176,9 @@
  589. _p('ifeq (/bin,$(findstring /bin,$(SHELL)))')
  590. _p(' SHELLTYPE := posix')
  591. _p('endif')
  592. + _p('ifeq (/bin,$(findstring /bin,$(MAKESHELL)))')
  593. + _p(' SHELLTYPE := posix')
  594. + _p('endif')
  595. _p('')
  596.  
  597. -- main build rule(s)
  598. diff -uNr -b 3rdparty/genie/src/base/project.lua.org 3rdparty/genie/src/base/project.lua
  599. --- 3rdparty/genie/src/base/project.lua.org 2015-07-29 10:23:10.000000000 +0900
  600. +++ 3rdparty/genie/src/base/project.lua 2015-07-30 16:33:06.000000000 +0900
  601. @@ -507,6 +507,8 @@
  602. bundlename = name .. ".app"
  603. bundlepath = path.join(dir, bundlename)
  604. dir = path.join(bundlepath, "Contents/MacOS")
  605. + elseif (kind == "ConsoleApp" or kind == "WindowedApp") and system == "os2" then
  606. + ext = ".exe"
  607. elseif kind == "SharedLib" then
  608. prefix = "lib"
  609. ext = iif(system == "macosx", ".dylib", ".so")
  610. diff -uNr -b 3rdparty/genie/src/host/os_getversion.c.org 3rdparty/genie/src/host/os_getversion.c
  611. --- 3rdparty/genie/src/host/os_getversion.c.org 2015-07-29 10:23:10.000000000 +0900
  612. +++ 3rdparty/genie/src/host/os_getversion.c 2015-07-30 16:33:06.000000000 +0900
  613. @@ -232,6 +232,30 @@
  614.  
  615. /*************************************************************/
  616.  
  617. +#elif defined(PLATFORM_OS2)
  618. +
  619. +#define INCL_DOS
  620. +#include <os2.h>
  621. +
  622. +void getversion(struct OsVersionInfo* info)
  623. +{
  624. + ULONG ulMajor;
  625. + ULONG ulMinor;
  626. + ULONG ulRev;
  627. +
  628. + DosQuerySysInfo(QSV_VERSION_MAJOR, QSV_VERSION_MAJOR, &ulMajor, sizeof(ulMajor));
  629. + DosQuerySysInfo(QSV_VERSION_MINOR, QSV_VERSION_MINOR, &ulMinor, sizeof(ulMinor));
  630. + DosQuerySysInfo(QSV_VERSION_REVISION, QSV_VERSION_REVISION,
  631. + &ulRev, sizeof(ulRev));
  632. +
  633. + info->majorversion = ulMajor;
  634. + info->minorversion = ulMinor;
  635. + info->revision = ulRev;
  636. + info->description = PLATFORM_STRING;
  637. +}
  638. +
  639. +/*************************************************************/
  640. +
  641. #else
  642.  
  643. void getversion(struct OsVersionInfo* info)
  644. diff -uNr -b 3rdparty/genie/src/host/os_pathsearch.c.org 3rdparty/genie/src/host/os_pathsearch.c
  645. --- 3rdparty/genie/src/host/os_pathsearch.c.org 2015-07-29 10:23:10.000000000 +0900
  646. +++ 3rdparty/genie/src/host/os_pathsearch.c 2015-07-30 16:33:06.000000000 +0900
  647. @@ -29,7 +29,7 @@
  648. /* look for the closest path separator ; or : */
  649. /* can't use : on windows because it breaks on C:\path */
  650. const char* semi = strchr(path, ';');
  651. -#if !defined(PLATFORM_WINDOWS)
  652. +#if !defined(PLATFORM_WINDOWS) && !defined(PLATFORM_OS2)
  653. const char* full = strchr(path, ':');
  654. #else
  655. const char* full = NULL;
  656. diff -uNr -b 3rdparty/genie/src/host/os_uuid.c.org 3rdparty/genie/src/host/os_uuid.c
  657. --- 3rdparty/genie/src/host/os_uuid.c.org 2015-07-29 10:23:10.000000000 +0900
  658. +++ 3rdparty/genie/src/host/os_uuid.c 2015-07-30 16:33:06.000000000 +0900
  659. @@ -49,6 +49,10 @@
  660. {
  661. #if PLATFORM_WINDOWS
  662. CoCreateGuid((GUID*)bytes);
  663. +#elif PLATFORM_OS2
  664. + int i;
  665. + for (i = 0; i < 16; i++)
  666. + bytes[i] = (unsigned char)gethrtime();
  667. #else
  668. int result;
  669.  
  670. diff -uNr -b 3rdparty/genie/src/host/premake.h.org 3rdparty/genie/src/host/premake.h
  671. --- 3rdparty/genie/src/host/premake.h.org 2015-07-29 10:23:10.000000000 +0900
  672. +++ 3rdparty/genie/src/host/premake.h 2015-07-30 16:33:06.000000000 +0900
  673. @@ -24,6 +24,9 @@
  674. #elif defined(__APPLE__) && defined(__MACH__)
  675. #define PLATFORM_MACOSX (1)
  676. #define PLATFORM_STRING "macosx"
  677. +#elif defined(__OS2__)
  678. +#define PLATFORM_OS2 (1)
  679. +#define PLATFORM_STRING "os2"
  680. #else
  681. #define PLATFORM_WINDOWS (1)
  682. #define PLATFORM_STRING "windows"
  683. diff -uNr -b 3rdparty/genie/src/host/scripts.c.org 3rdparty/genie/src/host/scripts.c
  684. --- 3rdparty/genie/src/host/scripts.c.org 2015-07-29 10:23:10.000000000 +0900
  685. +++ 3rdparty/genie/src/host/scripts.c 2015-07-30 16:33:06.000000000 +0900
  686. @@ -55,10 +55,10 @@
  687. "roject.getbasename(prjname, pattern)\nreturn pattern:gsub(\"%%%%\", prjname)\nend\nfunction premake.project.getfilename(prj, pattern)\nlocal fname = premake.project.getbasename(prj.name, pattern)\nfname = path.join(prj.location, fname)\nreturn path.getrelative(os.getcwd(), fname)\nend\n function premake.getlinks(cfg, kind, part)\nlocal result = iif (part == \"directory\" and kind == \"all\", cfg.libdirs, {})\nlocal cfgname = iif(cfg.name == cfg.project.name, \"\", cfg.name)\nlocal pathstyle = premake.getpathstyle(cfg)\nlocal namestyle = premake.getnamestyle(cfg)\nlocal function canlink(source, target)\nif (target.kind ~= \"SharedLib\" and target.kind ~= \"StaticLib\") then\nreturn false\nend\nif premake.iscppproject(source) then\nreturn premake.iscppproject(target)\nelseif premake.isdotnetproject(source) then\nreturn premake.isdotnetproject(target)\nend\nend\nfor _, link in ipairs(cfg.links) do\nlocal item\nlocal prj = premake.findproject(link)\nif prj and kind ~= \"system\" then\nlocal prjcfg = premake.getcon"
  688. "fig(prj, cfgname, cfg.platform)\nif kind == \"dependencies\" or canlink(cfg, prjcfg) then\nif (part == \"directory\") then\nitem = path.rebase(prjcfg.linktarget.directory, prjcfg.location, cfg.location)\nelseif (part == \"basename\") then\nitem = prjcfg.linktarget.basename\nelseif (part == \"fullpath\") then\nitem = path.rebase(prjcfg.linktarget.fullpath, prjcfg.location, cfg.location)\nelseif (part == \"object\") then\nitem = prjcfg\nend\nend\nelseif not prj and (kind == \"system\" or kind == \"all\") then\nif (part == \"directory\") then\nitem = path.getdirectory(link)\nelseif (part == \"fullpath\") then\nitem = link\nif namestyle == \"windows\" then\nif premake.iscppproject(cfg) then\nitem = item .. \".lib\"\nelseif premake.isdotnetproject(cfg) then\nitem = item .. \".dll\"\nend\nend\nelseif part == \"name\" then\nitem = path.getname(link)\nelseif part == \"basename\" then\nitem = path.getbasename(link)\nelse\nitem = link\nend\nif item:find(\"/\", nil, true) then\nitem = path.getrelative(cfg.project.locatio"
  689. "n, item)\nend\nend\nif item then\nif pathstyle == \"windows\" and part ~= \"object\" then\nitem = path.translate(item, \"\\\\\")\nend\nif not table.contains(result, item) then\ntable.insert(result, item)\nend\nend\nend\nreturn result\nend\nfunction premake.getnamestyle(cfg)\nreturn premake.platforms[cfg.platform].namestyle or premake.gettool(cfg).namestyle or \"posix\"\nend\nfunction premake.getpathstyle(cfg)\nif premake.action.current().os == \"windows\" then\nreturn \"windows\"\nelse\nreturn \"posix\"\nend\nend\nfunction premake.gettarget(cfg, direction, pathstyle, namestyle, system)\nif system == \"bsd\" then\nsystem = \"linux\"\nend\nlocal kind = cfg.kind\nif premake.iscppproject(cfg) then\nif (namestyle == \"windows\" or system == \"windows\")\nand kind == \"SharedLib\" and direction == \"link\"\nand not cfg.flags.NoImportLib\nthen\nkind = \"StaticLib\"\nend\nif namestyle == \"posix\" and system == \"windows\" and kind ~= \"StaticLib\" then\nnamestyle = \"windows\"\nend\nend\nlocal field = \"build\"\nif"
  690. - " direction == \"link\" and cfg.kind == \"SharedLib\" then\nfield = \"implib\"\nend\nlocal name = cfg[field..\"name\"] or cfg.targetname or cfg.project.name\nlocal dir = cfg[field..\"dir\"] or cfg.targetdir or path.getrelative(cfg.location, cfg.basedir)\nlocal subdir = cfg[field..\"subdir\"] or cfg.targetsubdir or \".\"\nlocal prefix = \"\"\nlocal suffix = \"\"\nlocal ext = \"\"\nlocal bundlepath, bundlename\ndir = path.join(dir, subdir)\nif namestyle == \"windows\" then\nif kind == \"ConsoleApp\" or kind == \"WindowedApp\" then\next = \".exe\"\nelseif kind == \"SharedLib\" then\next = \".dll\"\nelseif kind == \"StaticLib\" then\next = \".lib\"\nend\nelseif namestyle == \"posix\" then\nif kind == \"WindowedApp\" and system == \"macosx\" then\nbundlename = name .. \".app\"\nbundlepath = path.join(dir, bundlename)\ndir = path.join(bundlepath, \"Contents/MacOS\")\nelseif kind == \"SharedLib\" then\nprefix = \"lib\"\next = iif(system == \"macosx\", \".dylib\", \".so\")\nelseif kind == \"StaticLib\" th"
  691. - "en\nprefix = \"lib\"\next = \".a\"\nend\nelseif namestyle == \"PS3\" then\nif kind == \"ConsoleApp\" or kind == \"WindowedApp\" then\next = \".elf\"\nelseif kind == \"StaticLib\" then\nprefix = \"lib\"\next = \".a\"\nend\nelseif namestyle == \"Orbis\" then\nif kind == \"ConsoleApp\" or kind == \"WindowedApp\" then\next = \".elf\"\nelseif kind == \"StaticLib\" then\nprefix = \"lib\"\next = \".a\"\nend\nend\nprefix = cfg[field..\"prefix\"] or cfg.targetprefix or prefix\nsuffix = cfg[field..\"suffix\"] or cfg.targetsuffix or suffix\next = cfg[field..\"extension\"] or cfg.targetextension or ext\nlocal result = { }\nresult.basename = name .. suffix\nresult.name = prefix .. name .. suffix .. ext\nresult.directory = dir\nresult.subdirectory = subdir\nresult.prefix = prefix\nresult.suffix = suffix\nresult.fullpath = path.join(result.directory, result.name)\nresult.bundlepath = bundlepath or result.fullpath\nif pathstyle == \"windows\" then\nresult.directory = path.translate(resul"
  692. - "t.directory, \"\\\\\")\nresult.subdirectory = path.translate(result.subdirectory, \"\\\\\")\nresult.fullpath = path.translate(result.fullpath, \"\\\\\")\nend\nreturn result\nend\nfunction premake.gettool(cfg)\nif premake.iscppproject(cfg) then\nif _OPTIONS.cc then\nreturn premake[_OPTIONS.cc]\nend\nlocal action = premake.action.current()\nif action.valid_tools then\nreturn premake[action.valid_tools.cc[1]]\nend\nreturn premake.gcc\nelse\nreturn premake.dotnet\nend\nend\nfunction premake.project.getvpath(prj, abspath)\nlocal vpath = abspath\nlocal fname = path.getname(abspath)\nlocal max = abspath:len() - fname:len()\nfor replacement, patterns in pairs(prj.vpaths or {}) do\nfor _, pattern in ipairs(patterns) do\nlocal i = abspath:find(path.wildcards(pattern))\nif i == 1 then\ni = pattern:find(\"*\", 1, true) or (pattern:len() + 1)\nlocal leaf\nif i < max then\nleaf = abspath:sub(i)\nelse\nleaf = fname\nend\nif leaf:startswith(\"/\") then\nleaf = leaf:sub(2)\nend\nlocal stem = \"\"\nif replacement:len() > 0"
  693. - " then\nstem, stars = replacement:gsub(\"%*\", \"\")\nif stars == 0 then\nleaf = path.getname(leaf)\nend\nelse\nleaf = path.getname(leaf)\nend\nvpath = path.join(stem, leaf)\nend\nend\nend\nreturn path.trimdots(vpath)\nend\nfunction premake.hascppproject(sln)\nfor prj in premake.solution.eachproject(sln) do\nif premake.iscppproject(prj) then\nreturn true\nend\nend\nend\nfunction premake.hasdotnetproject(sln)\nfor prj in premake.solution.eachproject(sln) do\nif premake.isdotnetproject(prj) then\nreturn true\nend\nend\nend\nfunction premake.project.iscproject(prj)\nreturn prj.language == \"C\"\nend\nfunction premake.iscppproject(prj)\nreturn (prj.language == \"C\" or prj.language == \"C++\")\nend\nfunction premake.isdotnetproject(prj)\nreturn (prj.language == \"C#\")\nend\n",
  694. + " direction == \"link\" and cfg.kind == \"SharedLib\" then\nfield = \"implib\"\nend\nlocal name = cfg[field..\"name\"] or cfg.targetname or cfg.project.name\nlocal dir = cfg[field..\"dir\"] or cfg.targetdir or path.getrelative(cfg.location, cfg.basedir)\nlocal subdir = cfg[field..\"subdir\"] or cfg.targetsubdir or \".\"\nlocal prefix = \"\"\nlocal suffix = \"\"\nlocal ext = \"\"\nlocal bundlepath, bundlename\ndir = path.join(dir, subdir)\nif namestyle == \"windows\" then\nif kind == \"ConsoleApp\" or kind == \"WindowedApp\" then\next = \".exe\"\nelseif kind == \"SharedLib\" then\next = \".dll\"\nelseif kind == \"StaticLib\" then\next = \".lib\"\nend\nelseif namestyle == \"posix\" then\nif kind == \"WindowedApp\" and system == \"macosx\" then\nbundlename = name .. \".app\"\nbundlepath = path.join(dir, bundlename)\ndir = path.join(bundlepath, \"Contents/MacOS\")\nelseif (kind == \"ConsoleApp\" or kind == \"WindowedApp\") and system == \"os2\" then ext = \".exe\"\nelseif kind == \"SharedLib\" then\np"
  695. + "refix = \"lib\"\next = iif(system == \"macosx\", \".dylib\", \".so\")\nelseif kind == \"StaticLib\" then\nprefix = \"lib\"\next = \".a\"\nend\nelseif namestyle == \"PS3\" then\nif kind == \"ConsoleApp\" or kind == \"WindowedApp\" then\next = \".elf\"\nelseif kind == \"StaticLib\" then\nprefix = \"lib\"\next = \".a\"\nend\nelseif namestyle == \"Orbis\" then\nif kind == \"ConsoleApp\" or kind == \"WindowedApp\" then\next = \".elf\"\nelseif kind == \"StaticLib\" then\nprefix = \"lib\"\next = \".a\"\nend\nend\nprefix = cfg[field..\"prefix\"] or cfg.targetprefix or prefix\nsuffix = cfg[field..\"suffix\"] or cfg.targetsuffix or suffix\next = cfg[field..\"extension\"] or cfg.targetextension or ext\nlocal result = { }\nresult.basename = name .. suffix\nresult.name = prefix .. name .. suffix .. ext\nresult.directory = dir\nresult.subdirectory = subdir\nresult.prefix = prefix\nresult.suffix = suffix\nresult.fullpath = path.join(result.directory, result.name)\nresult.bundlepath = bundl"
  696. + "epath or result.fullpath\nif pathstyle == \"windows\" then\nresult.directory = path.translate(result.directory, \"\\\\\")\nresult.subdirectory = path.translate(result.subdirectory, \"\\\\\")\nresult.fullpath = path.translate(result.fullpath, \"\\\\\")\nend\nreturn result\nend\nfunction premake.gettool(cfg)\nif premake.iscppproject(cfg) then\nif _OPTIONS.cc then\nreturn premake[_OPTIONS.cc]\nend\nlocal action = premake.action.current()\nif action.valid_tools then\nreturn premake[action.valid_tools.cc[1]]\nend\nreturn premake.gcc\nelse\nreturn premake.dotnet\nend\nend\nfunction premake.project.getvpath(prj, abspath)\nlocal vpath = abspath\nlocal fname = path.getname(abspath)\nlocal max = abspath:len() - fname:len()\nfor replacement, patterns in pairs(prj.vpaths or {}) do\nfor _, pattern in ipairs(patterns) do\nlocal i = abspath:find(path.wildcards(pattern))\nif i == 1 then\ni = pattern:find(\"*\", 1, true) or (pattern:len() + 1)\nlocal leaf\nif i < max then\nleaf = abspath:sub(i)\nelse\nleaf = fname\nend"
  697. + "\nif leaf:startswith(\"/\") then\nleaf = leaf:sub(2)\nend\nlocal stem = \"\"\nif replacement:len() > 0 then\nstem, stars = replacement:gsub(\"%*\", \"\")\nif stars == 0 then\nleaf = path.getname(leaf)\nend\nelse\nleaf = path.getname(leaf)\nend\nvpath = path.join(stem, leaf)\nend\nend\nend\nreturn path.trimdots(vpath)\nend\nfunction premake.hascppproject(sln)\nfor prj in premake.solution.eachproject(sln) do\nif premake.iscppproject(prj) then\nreturn true\nend\nend\nend\nfunction premake.hasdotnetproject(sln)\nfor prj in premake.solution.eachproject(sln) do\nif premake.isdotnetproject(prj) then\nreturn true\nend\nend\nend\nfunction premake.project.iscproject(prj)\nreturn prj.language == \"C\"\nend\nfunction premake.iscppproject(prj)\nreturn (prj.language == \"C\" or prj.language == \"C++\")\nend\nfunction premake.isdotnetproject(prj)\nreturn (prj.language == \"C#\")\nend\n",
  698.  
  699. /* base/config.lua */
  700. "premake.config = { }\nlocal config = premake.config\nfunction premake.config.isdebugbuild(cfg)\nif cfg.flags.Optimize or cfg.flags.OptimizeSize or cfg.flags.OptimizeSpeed then\nreturn false\nend\nif not cfg.flags.Symbols then\nreturn false\nend\nreturn true\nend\nfunction premake.config.isincrementallink(cfg)\nif cfg.kind == \"StaticLib\" \nor config.isoptimizedbuild(cfg.flags)\nor cfg.flags.NoIncrementalLink then\nreturn false\nend\nreturn true\nend\nfunction premake.config.isoptimizedbuild(flags)\nreturn flags.Optimize or flags.OptimizeSize or flags.OptimizeSpeed\nend\n",
  701. @@ -184,24 +184,24 @@
  702. "ving)\nelse\n_p('\\t@echo Archiving %s', prj.name)\nend\nif (not prj.archivesplit_size) then\nprj.archivesplit_size=200\nend\nif (not prj.options.ArchiveSplit) then\n_p('\\t$(SILENT) $(LINKCMD) $(OBJECTS)')\nelse\n_p('\\t$(call RM,$(TARGET))')\n_p('\\t@$(call max_args,$(LINKCMD),'.. prj.archivesplit_size ..',$(OBJECTS))')\n_p('\\t$(SILENT) $(LINKCMD_NDX)')\nend\nelse\nif prj.msglinking then\n_p('\\t@echo ' .. prj.msglinking)\nelse\n_p('\\t@echo Linking %s', prj.name)\nend\n_p('\\t$(SILENT) $(LINKCMD)')\nend\n_p('\\t$(POSTBUILDCMDS)')\n_p('')\n_p('$(TARGETDIR):')\npremake.make_mkdirrule(\"$(TARGETDIR)\")\n_p('$(OBJDIRS):')\nif (not prj.solution.messageskip) or (not table.contains(prj.solution.messageskip, \"SkipCreatingMessage\")) then\n_p('\\t@echo Creating $(@)')\nend\n_p('\\t-$(call MKDIR,$@)')\n_p('')\nif os.is(\"MacOSX\") and prj.kind == \"WindowedApp\" then\n_p('$(dir $(TARGETDIR))PkgInfo:')\n_p('$(dir $(TARGETDIR))Info.plist:')\n_p('')\nend\n_p('clean:')\nif (not prj.solution.messageskip) or (not table.c"
  703. "ontains(prj.solution.messageskip, \"SkipCleaningMessage\")) then\n_p('\\t@echo Cleaning %s', prj.name)\nend\n_p('ifeq (posix,$(SHELLTYPE))')\n_p('\\t$(SILENT) rm -f $(TARGET)')\n_p('\\t$(SILENT) rm -rf $(OBJDIR)')\n_p('else')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(TARGET)) del $(subst /,\\\\\\\\,$(TARGET))')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(OBJDIR)) rmdir /s /q $(subst /,\\\\\\\\,$(OBJDIR))')\n_p('endif')\n_p('')\n_p('prebuild:')\n_p('\\t$(PREBUILDCMDS)')\n_p('')\n_p('prelink:')\n_p('\\t$(PRELINKCMDS)')\n_p('')\ncpp.pchrules(prj)\ncpp.fileRules(prj)\ncpp.dependencyRules(prj)\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nlocal deps = string.format(\"%s \",path.getrelative(prj.location,buildtask[1]))\nfor _, depdata in ipairs(buildtask[3] or {}) do\ndeps = deps .. string.format(\"%s \",path.getrelative(prj.location,depdata))\nend\n_p('%s: %s'\n,path.getrelative(prj.location,buildtask[2])\n, deps\n)\nfor _, cmdline "
  704. "in ipairs(buildtask[4] or {}) do\nlocal cmd = cmdline\nlocal num = 1\nfor _, depdata in ipairs(buildtask[3] or {}) do\ncmd = string.gsub(cmd,\"%$%(\" .. num ..\"%)\", string.format(\"%s \",path.getrelative(prj.location,depdata)))\nnum = num + 1\nend\ncmd = string.gsub(cmd, \"%$%(<%)\", \"$<\")\ncmd = string.gsub(cmd, \"%$%(@%)\", \"$@\")\n \n_p('\\t$(SILENT) %s',cmd)\nend\n_p('')\nend\nend\n_p('-include $(OBJECTS:%%.o=%%.d)')\n_p('ifneq (,$(PCH))')\n_p(' -include $(OBJDIR)/$(notdir $(PCH)).d')\n_p('endif')\nend\nfunction premake.gmake_cpp_header(prj, cc, platforms)\n_p('# %s project makefile autogenerated by GENie', premake.action.current().shortname)\n_p('ifndef config')\n_p(' config=%s', _MAKE.esc(premake.getconfigname(prj.solution.configurations[1], platforms[1], true)))\n_p('endif')\n_p('')\n_p('ifndef verbose')\n_p(' SILENT = @')\n_p('endif')\n_p('')\n_p('SHELLTYPE := msdos')\n_p('ifeq (,$(ComSpec)$(COMSPEC))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(SHELL)))')\n_p("
  705. - "' SHELLTYPE := posix')\n_p('endif')\n_p('')\n_p('ifeq (posix,$(SHELLTYPE))')\n_p(' MKDIR = $(SILENT) mkdir -p \"$(1)\"')\n_p(' COPY = $(SILENT) cp -fR \"$(1)\" \"$(2)\"')\n_p(' RM= $(SILENT) rm -f \"$(1)\"')\n_p('else')\n_p(' MKDIR = $(SILENT) mkdir \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p(' COPY = $(SILENT) copy /Y \"$(subst /,\\\\\\\\,$(1))\" \"$(subst /,\\\\\\\\,$(2))\"')\n_p(' RM = $(SILENT) del /F \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p('endif')\n_p('')\n_p('CC = %s', cc.cc)\n_p('CXX = %s', cc.cxx)\n_p('AR = %s', cc.ar)\n_p('')\n_p('ifndef RESCOMP')\n_p(' ifdef WINDRES')\n_p(' RESCOMP = $(WINDRES)')\n_p(' else')\n_p(' RESCOMP = windres')\n_p(' endif')\n_p('endif')\n_p('')\nend\nfunction premake.gmake_cpp_config(prj, cfg, cc)\n_p('ifeq ($(config),%s)', _MAKE.esc(cfg.shortname))\ncpp.platformtools(cfg, cc)\n_p(' ' .. (table.contains(premake.make.override,\"OBJDIR\") and \"override \" or \"\") .. 'OBJDIR = %s', _MAKE.esc(cfg.objectsdir))\n_p(' ' .. (tabl"
  706. - "e.contains(premake.make.override,\"TARGETDIR\") and \"override \" or \"\") .. 'TARGETDIR = %s', _MAKE.esc(cfg.buildtarget.directory))\n_p(' ' .. (table.contains(premake.make.override,\"TARGET\") and \"override \" or \"\") .. 'TARGET = $(TARGETDIR)/%s', _MAKE.esc(cfg.buildtarget.name))\n_p(' DEFINES +=%s', make.list(cc.getdefines(cfg.defines)))\n_p(' INCLUDES +=%s', make.list(cc.getincludedirs(cfg.includedirs)))\ncpp.pchconfig(cfg)\ncpp.flags(cfg, cc)\ncpp.linker(prj, cfg, cc)\n_p(' OBJECTS := \\\\')\nfor _, file in ipairs(prj.files) do\nif path.iscppfile(file) then\nif not table.icontains(cfg.excludes, file) then\n_p('\\t$(OBJDIR)/%s.o \\\\'\n, _MAKE.esc(path.trimdots(path.removeext(file)))\n)\nend\nend\nend\n_p('')\n_p(' define PREBUILDCMDS')\nif #cfg.prebuildcommands > 0 then\n_p('\\t@echo Running pre-build commands')\n_p('\\t%s', table.implode(cfg.prebuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define PRELINKCMDS')\nif #cfg.prelinkcommands > 0 then\n_p('\\t@echo Running"
  707. - " pre-link commands')\n_p('\\t%s', table.implode(cfg.prelinkcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define POSTBUILDCMDS')\nif #cfg.postbuildcommands > 0 then\n_p('\\t@echo Running post-build commands')\n_p('\\t%s', table.implode(cfg.postbuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\nmake.settings(cfg, cc)\n_p('endif')\n_p('')\nend\nfunction cpp.platformtools(cfg, cc)\nlocal platform = cc.platforms[cfg.platform]\nif platform.cc then\n_p(' CC = %s', platform.cc)\nend\nif platform.cxx then\n_p(' CXX = %s', platform.cxx)\nend\nif platform.ar then\n_p(' AR = %s', platform.ar)\nend\nend\nfunction cpp.flags(cfg, cc)\nif cfg.pchheader and not cfg.flags.NoPCH then\n_p(' FORCE_INCLUDE += -include $(OBJDIR)/$(notdir $(PCH))')\nend\nif #cfg.forcedincludes > 0 then\n_p(' FORCE_INCLUDE += -include %s'\n,premake.esc(table.concat(cfg.forcedincludes, \";\")))\nend\n_p(' ALL_CPPFLAGS += $(CPPFLAGS) %s $(DEFINES) $(INCLUDES)', table.concat(cc.getcppflags(cfg), \" "
  708. - "\"))\n_p(' ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cfg.buildoptions, cfg.buildoptions_c)))\n_p(' ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cc.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_cpp)))\n_p(' ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cc.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_objc)))\n_p(' ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)%s',\n make.list(table.join(cc.getdefines(cfg.resdefines),\n cc.getincludedirs(cfg.resincludedirs), cfg.resoptions)))\nend\nfunction cpp.linker(prj, cfg, cc)\n_p(' ALL_LDFLAGS += $(LDFLAGS)%s', make.list(table.join(cc.getlibdirflags(cfg), cc.getldflags(cfg), cfg.linkoptions)))\n_p(' LDDEPS +=%s', make.list(_MAKE.esc(premake.getlinks(cfg, \"siblings\", \"fullpath\"))))\n_p(' LIBS += $(LDDEPS)%s', make.list(cc.ge"
  709. - "tlinkflags(cfg)))\nif cfg.kind == \"StaticLib\" then\nif cfg.platform:startswith(\"Universal\") then\n_p(' LINKCMD = libtool -o $(TARGET)')\nelse\nif (not prj.options.ArchiveSplit) then\nif cc.llvm then\n_p(' LINKCMD = $(AR) rcs $(TARGET)')\nelse\n_p(' LINKCMD = $(AR) -rcs $(TARGET)')\nend\nelse\nif cc.llvm then\n_p(' LINKCMD = $(AR) qc $(TARGET)')\n_p(' LINKCMD_NDX= $(AR) cs $(TARGET)')\nelse\n_p(' LINKCMD = $(AR) -qc $(TARGET)')\n_p(' LINKCMD_NDX= $(AR) -cs $(TARGET)')\nend\nend\nend\nelse\nlocal tool = iif(cfg.language == \"C\", \"CC\", \"CXX\")\n_p(' LINKCMD = $(%s) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)', tool)\nend\nend\nfunction cpp.pchconfig(cfg)\nif not cfg.pchheader or cfg.flags.NoPCH then\nreturn\nend\nlocal pch = cfg.pchheader\nfor _, incdir in ipairs(cfg.includedirs) do\nlocal abspath = path.getabsolute(path.join(cfg.project.location, incdir))\nlocal testname = path.join(abspath, pch)\nif os.isfile(testname) then\npch = path.getrelative(cfg.lo"
  710. - "cation, testname)\nbreak\nend\nend\n_p(' PCH = %s', _MAKE.esc(pch))\n_p(' GCH = $(OBJDIR)/$(notdir $(PCH)).gch')\nend\nfunction cpp.pchrules(prj)\n_p('ifneq (,$(PCH))')\n_p('$(GCH): $(PCH)')\n_p('\\t@echo $(notdir $<)')\nlocal cmd = iif(prj.language == \"C\", \"$(CC) -x c-header $(ALL_CFLAGS)\", \"$(CXX) -x c++-header $(ALL_CXXFLAGS)\")\n_p('\\t$(SILENT) %s -MMD -MP $(DEFINES) $(INCLUDES) -o \"$@\" -MF \"$(@:%%.gch=%%.d)\" -c \"$<\"', cmd)\n_p('endif')\n_p('')\nend\nfunction cpp.fileRules(prj)\nfor _, file in ipairs(prj.files or {}) do\nif path.iscppfile(file) then\n_p('$(OBJDIR)/%s.o: %s'\n, _MAKE.esc(path.trimdots(path.removeext(file)))\n, _MAKE.esc(file)\n)\nif (path.isobjcfile(file) and prj.msgcompile_objc) then\n_p('\\t@echo ' .. prj.msgcompile_objc)\nelseif prj.msgcompile then\n_p('\\t@echo ' .. prj.msgcompile)\nelse\n_p('\\t@echo $(notdir $<)')\nend\nif (path.isobjcfile(file)) then\n_p('\\t$(SILENT) $(CXX) $(ALL_OBJCFLAGS) $(FORCE_INCLUDE) -o \"$@\" -MF $(@:%%.o=%%.d) -c \"$<\"')\nelse\n"
  711. - "cpp.buildcommand(path.iscfile(file) and not prj.options.ForceCPP, \"o\")\nend\nfor _, task in ipairs(prj.postcompiletasks or {}) do\n_p('\\t$(SILENT) %s', task)\n_p('')\nend\n_p('')\nelseif (path.getextension(file) == \".rc\") then\n_p('$(OBJDIR)/%s.res: %s', _MAKE.esc(path.getbasename(file)), _MAKE.esc(file))\nif prj.msgresource then\n_p('\\t@echo ' .. prj.msgresource)\nelse\n_p('\\t@echo $(notdir $<)')\nend\n_p('\\t$(SILENT) $(RESCOMP) $< -O coff -o \"$@\" $(ALL_RESFLAGS)')\n_p('')\nend\nend\nend\nfunction cpp.dependencyRules(prj)\nfor _, dependency in ipairs(prj.dependency or {}) do\nfor _, dep in ipairs(dependency or {}) do\nif (dep[3]==nil or dep[3]==false) then\n_p('$(OBJDIR)/%s.o: %s'\n, _MAKE.esc(path.trimdots(path.removeext(path.getrelative(prj.location, dep[1]))))\n, _MAKE.esc(path.getrelative(prj.location, dep[2]))\n)\nelse\n_p('%s: %s'\n, _MAKE.esc(dep[1])\n, _MAKE.esc(path.getrelative(prj.location, dep[2]))\n)\nend\n_p('')\nend\nend\nend\nfunction cpp.buildcommand(iscfile, objext)\nlocal flags = i"
  712. - "if(iscfile, '$(CC) $(ALL_CFLAGS)', '$(CXX) $(ALL_CXXFLAGS)')\n_p('\\t$(SILENT) %s $(FORCE_INCLUDE) -o \"$@\" -MF $(@:%%.%s=%%.d) -c \"$<\"', flags, objext)\nend\n",
  713. + "' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(MAKESHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('')\n_p('ifeq (posix,$(SHELLTYPE))')\n_p(' MKDIR = $(SILENT) mkdir -p \"$(1)\"')\n_p(' COPY = $(SILENT) cp -fR \"$(1)\" \"$(2)\"')\n_p(' RM= $(SILENT) rm -f \"$(1)\"')\n_p('else')\n_p(' MKDIR = $(SILENT) mkdir \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p(' COPY = $(SILENT) copy /Y \"$(subst /,\\\\\\\\,$(1))\" \"$(subst /,\\\\\\\\,$(2))\"')\n_p(' RM = $(SILENT) del /F \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p('endif')\n_p('')\n_p('CC = %s', cc.cc)\n_p('CXX = %s', cc.cxx)\n_p('AR = %s', cc.ar)\n_p('')\n_p('ifndef RESCOMP')\n_p(' ifdef WINDRES')\n_p(' RESCOMP = $(WINDRES)')\n_p(' else')\n_p(' RESCOMP = windres')\n_p(' endif')\n_p('endif')\n_p('')\nend\nfunction premake.gmake_cpp_config(prj, cfg, cc)\n_p('ifeq ($(config),%s)', _MAKE.esc(cfg.shortname))\ncpp.platformtools(cfg, cc)\n_p(' ' .. (table.contains(premake.make.override,\"OBJDIR\") and "
  714. + "\"override \" or \"\") .. 'OBJDIR = %s', _MAKE.esc(cfg.objectsdir))\n_p(' ' .. (table.contains(premake.make.override,\"TARGETDIR\") and \"override \" or \"\") .. 'TARGETDIR = %s', _MAKE.esc(cfg.buildtarget.directory))\n_p(' ' .. (table.contains(premake.make.override,\"TARGET\") and \"override \" or \"\") .. 'TARGET = $(TARGETDIR)/%s', _MAKE.esc(cfg.buildtarget.name))\n_p(' DEFINES +=%s', make.list(cc.getdefines(cfg.defines)))\n_p(' INCLUDES +=%s', make.list(cc.getincludedirs(cfg.includedirs)))\ncpp.pchconfig(cfg)\ncpp.flags(cfg, cc)\ncpp.linker(prj, cfg, cc)\n_p(' OBJECTS := \\\\')\nfor _, file in ipairs(prj.files) do\nif path.iscppfile(file) then\nif not table.icontains(cfg.excludes, file) then\n_p('\\t$(OBJDIR)/%s.o \\\\'\n, _MAKE.esc(path.trimdots(path.removeext(file)))\n)\nend\nend\nend\n_p('')\n_p(' define PREBUILDCMDS')\nif #cfg.prebuildcommands > 0 then\n_p('\\t@echo Running pre-build commands')\n_p('\\t%s', table.implode(cfg.prebuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' "
  715. + " endef')\n_p(' define PRELINKCMDS')\nif #cfg.prelinkcommands > 0 then\n_p('\\t@echo Running pre-link commands')\n_p('\\t%s', table.implode(cfg.prelinkcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define POSTBUILDCMDS')\nif #cfg.postbuildcommands > 0 then\n_p('\\t@echo Running post-build commands')\n_p('\\t%s', table.implode(cfg.postbuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\nmake.settings(cfg, cc)\n_p('endif')\n_p('')\nend\nfunction cpp.platformtools(cfg, cc)\nlocal platform = cc.platforms[cfg.platform]\nif platform.cc then\n_p(' CC = %s', platform.cc)\nend\nif platform.cxx then\n_p(' CXX = %s', platform.cxx)\nend\nif platform.ar then\n_p(' AR = %s', platform.ar)\nend\nend\nfunction cpp.flags(cfg, cc)\nif cfg.pchheader and not cfg.flags.NoPCH then\n_p(' FORCE_INCLUDE += -include $(OBJDIR)/$(notdir $(PCH))')\nend\nif #cfg.forcedincludes > 0 then\n_p(' FORCE_INCLUDE += -include %s'\n,premake.esc(table.concat(cfg.forcedincludes, \";\")))\nend\n_p(' AL"
  716. + "L_CPPFLAGS += $(CPPFLAGS) %s $(DEFINES) $(INCLUDES)', table.concat(cc.getcppflags(cfg), \" \"))\n_p(' ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cfg.buildoptions, cfg.buildoptions_c)))\n_p(' ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cc.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_cpp)))\n_p(' ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cc.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_objc)))\n_p(' ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)%s',\n make.list(table.join(cc.getdefines(cfg.resdefines),\n cc.getincludedirs(cfg.resincludedirs), cfg.resoptions)))\nend\nfunction cpp.linker(prj, cfg, cc)\n_p(' ALL_LDFLAGS += $(LDFLAGS)%s', make.list(table.join(cc.getlibdirflags(cfg), cc.getldflags(cfg), cfg.linkoptions)))\n_p(' LDDEPS +=%s', make.list(_MAKE.esc(premake.ge"
  717. + "tlinks(cfg, \"siblings\", \"fullpath\"))))\n_p(' LIBS += $(LDDEPS)%s', make.list(cc.getlinkflags(cfg)))\nif cfg.kind == \"StaticLib\" then\nif cfg.platform:startswith(\"Universal\") then\n_p(' LINKCMD = libtool -o $(TARGET)')\nelse\nif (not prj.options.ArchiveSplit) then\nif cc.llvm then\n_p(' LINKCMD = $(AR) rcs $(TARGET)')\nelse\n_p(' LINKCMD = $(AR) -rcs $(TARGET)')\nend\nelse\nif cc.llvm then\n_p(' LINKCMD = $(AR) qc $(TARGET)')\n_p(' LINKCMD_NDX= $(AR) cs $(TARGET)')\nelse\n_p(' LINKCMD = $(AR) -qc $(TARGET)')\n_p(' LINKCMD_NDX= $(AR) -cs $(TARGET)')\nend\nend\nend\nelse\nlocal tool = iif(cfg.language == \"C\", \"CC\", \"CXX\")\n_p(' LINKCMD = $(%s) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)', tool)\nend\nend\nfunction cpp.pchconfig(cfg)\nif not cfg.pchheader or cfg.flags.NoPCH then\nreturn\nend\nlocal pch = cfg.pchheader\nfor _, incdir in ipairs(cfg.includedirs) do\nlocal abspath = path.getabsolute(path.join(cfg.project.location, incdir))\nlocal te"
  718. + "stname = path.join(abspath, pch)\nif os.isfile(testname) then\npch = path.getrelative(cfg.location, testname)\nbreak\nend\nend\n_p(' PCH = %s', _MAKE.esc(pch))\n_p(' GCH = $(OBJDIR)/$(notdir $(PCH)).gch')\nend\nfunction cpp.pchrules(prj)\n_p('ifneq (,$(PCH))')\n_p('$(GCH): $(PCH)')\n_p('\\t@echo $(notdir $<)')\nlocal cmd = iif(prj.language == \"C\", \"$(CC) -x c-header $(ALL_CFLAGS)\", \"$(CXX) -x c++-header $(ALL_CXXFLAGS)\")\n_p('\\t$(SILENT) %s -MMD -MP $(DEFINES) $(INCLUDES) -o \"$@\" -MF \"$(@:%%.gch=%%.d)\" -c \"$<\"', cmd)\n_p('endif')\n_p('')\nend\nfunction cpp.fileRules(prj)\nfor _, file in ipairs(prj.files or {}) do\nif path.iscppfile(file) then\n_p('$(OBJDIR)/%s.o: %s'\n, _MAKE.esc(path.trimdots(path.removeext(file)))\n, _MAKE.esc(file)\n)\nif (path.isobjcfile(file) and prj.msgcompile_objc) then\n_p('\\t@echo ' .. prj.msgcompile_objc)\nelseif prj.msgcompile then\n_p('\\t@echo ' .. prj.msgcompile)\nelse\n_p('\\t@echo $(notdir $<)')\nend\nif (path.isobjcfile(file)) then\n_p('\\t$(SILEN"
  719. + "T) $(CXX) $(ALL_OBJCFLAGS) $(FORCE_INCLUDE) -o \"$@\" -MF $(@:%%.o=%%.d) -c \"$<\"')\nelse\ncpp.buildcommand(path.iscfile(file) and not prj.options.ForceCPP, \"o\")\nend\nfor _, task in ipairs(prj.postcompiletasks or {}) do\n_p('\\t$(SILENT) %s', task)\n_p('')\nend\n_p('')\nelseif (path.getextension(file) == \".rc\") then\n_p('$(OBJDIR)/%s.res: %s', _MAKE.esc(path.getbasename(file)), _MAKE.esc(file))\nif prj.msgresource then\n_p('\\t@echo ' .. prj.msgresource)\nelse\n_p('\\t@echo $(notdir $<)')\nend\n_p('\\t$(SILENT) $(RESCOMP) $< -O coff -o \"$@\" $(ALL_RESFLAGS)')\n_p('')\nend\nend\nend\nfunction cpp.dependencyRules(prj)\nfor _, dependency in ipairs(prj.dependency or {}) do\nfor _, dep in ipairs(dependency or {}) do\nif (dep[3]==nil or dep[3]==false) then\n_p('$(OBJDIR)/%s.o: %s'\n, _MAKE.esc(path.trimdots(path.removeext(path.getrelative(prj.location, dep[1]))))\n, _MAKE.esc(path.getrelative(prj.location, dep[2]))\n)\nelse\n_p('%s: %s'\n, _MAKE.esc(dep[1])\n, _MAKE.esc(path.getrelative(prj.location, dep[2]))"
  720. + "\n)\nend\n_p('')\nend\nend\nend\nfunction cpp.buildcommand(iscfile, objext)\nlocal flags = iif(iscfile, '$(CC) $(ALL_CFLAGS)', '$(CXX) $(ALL_CXXFLAGS)')\n_p('\\t$(SILENT) %s $(FORCE_INCLUDE) -o \"$@\" -MF $(@:%%.%s=%%.d) -c \"$<\"', flags, objext)\nend\n",
  721.  
  722. /* actions/make/make_csharp.lua */
  723. "local function getresourcefilename(cfg, fname)\nif path.getextension(fname) == \".resx\" then\n local name = cfg.buildtarget.basename .. \".\"\n local dir = path.getdirectory(fname)\n if dir ~= \".\" then \nname = name .. path.translate(dir, \".\") .. \".\"\nend\nreturn \"$(OBJDIR)/\" .. _MAKE.esc(name .. path.getbasename(fname)) .. \".resources\"\nelse\nreturn fname\nend\nend\nfunction premake.make_csharp(prj)\nlocal csc = premake.dotnet\nlocal cfglibs = { }\nlocal cfgpairs = { }\nlocal anycfg\nfor cfg in premake.eachconfig(prj) do\nanycfg = cfg\ncfglibs[cfg] = premake.getlinks(cfg, \"siblings\", \"fullpath\")\ncfgpairs[cfg] = { }\nfor _, fname in ipairs(cfglibs[cfg]) do\nif path.getdirectory(fname) ~= cfg.buildtarget.directory then\ncfgpairs[cfg][\"$(TARGETDIR)/\" .. _MAKE.esc(path.getname(fname))] = _MAKE.esc(fname)\nend\nend\nend\nlocal sources = {}\nlocal embedded = { }\nlocal copypairs = { }\nfor fcfg in premake.project.eachfile(prj) do\nlocal action = csc.getbuildaction(fcfg)\nif action == \"Co"
  724. "mpile\" then\ntable.insert(sources, fcfg.name)\nelseif action == \"EmbeddedResource\" then\ntable.insert(embedded, fcfg.name)\nelseif action == \"Content\" then\ncopypairs[\"$(TARGETDIR)/\" .. _MAKE.esc(path.getname(fcfg.name))] = _MAKE.esc(fcfg.name)\nelseif path.getname(fcfg.name):lower() == \"app.config\" then\ncopypairs[\"$(TARGET).config\"] = _MAKE.esc(fcfg.name)\nend\nend\nlocal paths = table.translate(prj.libdirs, function(v) return path.join(prj.basedir, v) end)\npaths = table.join({prj.basedir}, paths)\nfor _, libname in ipairs(premake.getlinks(prj, \"system\", \"fullpath\")) do\nlocal libdir = os.pathsearch(libname..\".dll\", unpack(paths))\nif (libdir) then\nlocal target = \"$(TARGETDIR)/\" .. _MAKE.esc(path.getname(libname))\nlocal source = path.getrelative(prj.basedir, path.join(libdir, libname))..\".dll\"\ncopypairs[target] = _MAKE.esc(source)\nend\nend\n_p('# %s project makefile autogenerated by GENie', premake.action.current().shortname)\n_p('')\n_p('ifndef config')\n_p(' config=%s', _MAKE.esc"
  725. - "(prj.configurations[1]:lower()))\n_p('endif')\n_p('')\n_p('ifndef verbose')\n_p(' SILENT = @')\n_p('endif')\n_p('')\n_p('SHELLTYPE := msdos')\n_p('ifeq (,$(ComSpec)$(COMSPEC))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(SHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('')\n_p('ifeq (posix,$(SHELLTYPE))')\n_p(' MKDIR = $(SILENT) mkdir -p \"$(1)\"')\n_p(' COPY = $(SILENT) cp -fR \"$(1)\" \"$(2)\"')\n_p('else')\n_p(' MKDIR = $(SILENT) mkdir \"$(subst /,\\\\\\\\,$(1))\" 2> nul')\n_p(' COPY = $(SILENT) copy /Y \"$(subst /,\\\\\\\\,$(1))\" \"$(subst /,\\\\\\\\,$(2))\"')\n_p('endif')\n_p('')\n_p('ifndef CSC')\n_p(' CSC=%s', csc.getcompilervar(prj))\n_p('endif')\n_p('')\n_p('ifndef RESGEN')\n_p(' RESGEN=resgen')\n_p('endif')\n_p('')\nlocal platforms = premake.filterplatforms(prj.solution, premake[_OPTIONS.cc].platforms)\ntable.insert(platforms, 1, \"\")\nfor cfg in premake.eachconfig(prj) do\npremake.gmake_cs_config(cfg, csc, cfglibs)\nend\n_p('# To maintain compatibi"
  726. - "lity with VS.NET, these values must be set at the project level')\n_p('TARGET := $(TARGETDIR)/%s', _MAKE.esc(prj.buildtarget.name))\n_p('FLAGS += /t:%s %s', csc.getkind(prj):lower(), table.implode(_MAKE.esc(prj.libdirs), \"/lib:\", \"\", \" \"))\n_p('REFERENCES += %s', table.implode(_MAKE.esc(premake.getlinks(prj, \"system\", \"basename\")), \"/r:\", \".dll\", \" \"))\n_p('')\n_p('SOURCES := \\\\')\nfor _, fname in ipairs(sources) do\n_p('\\t%s \\\\', _MAKE.esc(path.translate(fname)))\nend\n_p('')\n_p('EMBEDFILES := \\\\')\nfor _, fname in ipairs(embedded) do\n_p('\\t%s \\\\', getresourcefilename(prj, fname))\nend\n_p('')\n_p('COPYFILES += \\\\')\nfor target, source in pairs(cfgpairs[anycfg]) do\n_p('\\t%s \\\\', target)\nend\nfor target, source in pairs(copypairs) do\n_p('\\t%s \\\\', target)\nend\n_p('')\n_p('SHELLTYPE := msdos')\n_p('ifeq (,$(ComSpec)$(COMSPEC))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(SHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('')"
  727. - "\n_p('.PHONY: clean prebuild prelink')\n_p('')\n_p('all: $(TARGETDIR) $(OBJDIR) prebuild $(EMBEDFILES) $(COPYFILES) prelink $(TARGET)')\n_p('')\n_p('$(TARGET): $(SOURCES) $(EMBEDFILES) $(DEPENDS)')\n_p('\\t$(SILENT) $(CSC) /nologo /out:$@ $(FLAGS) $(REFERENCES) $(SOURCES) $(patsubst %%,/resource:%%,$(EMBEDFILES))')\n_p('\\t$(POSTBUILDCMDS)')\n_p('')\n_p('$(TARGETDIR):')\npremake.make_mkdirrule(\"$(TARGETDIR)\")\n_p('$(OBJDIR):')\npremake.make_mkdirrule(\"$(OBJDIR)\")\n_p('clean:')\n_p('\\t@echo Cleaning %s', prj.name)\n_p('ifeq (posix,$(SHELLTYPE))')\n_p('\\t$(SILENT) rm -f $(TARGETDIR)/%s.* $(COPYFILES)', prj.buildtarget.basename)\n_p('\\t$(SILENT) rm -rf $(OBJDIR)')\n_p('else')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(TARGETDIR)/%s.*) del $(subst /,\\\\\\\\,$(TARGETDIR)/%s.*)', prj.buildtarget.basename, prj.buildtarget.basename)\nfor target, source in pairs(cfgpairs[anycfg]) do\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,%s) del $(subst /,\\\\\\\\,%s)', target, target)\nend\nfor target, source in pa"
  728. - "irs(copypairs) do\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,%s) del $(subst /,\\\\\\\\,%s)', target, target)\nend\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(OBJDIR)) rmdir /s /q $(subst /,\\\\\\\\,$(OBJDIR))')\n_p('endif')\n_p('')\n_p('prebuild:')\n_p('\\t$(PREBUILDCMDS)')\n_p('')\n_p('prelink:')\n_p('\\t$(PRELINKCMDS)')\n_p('')\n_p('# Per-configuration copied file rules')\nfor cfg in premake.eachconfig(prj) do\n_p('ifneq (,$(findstring %s,$(config)))', _MAKE.esc(cfg.name:lower()))\nfor target, source in pairs(cfgpairs[cfg]) do\npremake.make_copyrule(source, target)\nend\n_p('endif')\n_p('')\nend\n_p('# Copied file rules')\nfor target, source in pairs(copypairs) do\npremake.make_copyrule(source, target)\nend\n_p('# Embedded file rules')\nfor _, fname in ipairs(embedded) do \nif path.getextension(fname) == \".resx\" then\n_p('%s: %s', getresourcefilename(prj, fname), _MAKE.esc(fname))\n_p('\\t$(SILENT) $(RESGEN) $^ $@')\nend\n_p('')\nend\nend\nfunction premake.gmake_cs_config(cfg, csc, cfglibs)\n_p('if"
  729. - "neq (,$(findstring %s,$(config)))', _MAKE.esc(cfg.name:lower()))\n_p(' TARGETDIR := %s', _MAKE.esc(cfg.buildtarget.directory))\n_p(' OBJDIR := %s', _MAKE.esc(cfg.objectsdir))\n_p(' DEPENDS := %s', table.concat(_MAKE.esc(premake.getlinks(cfg, \"dependencies\", \"fullpath\")), \" \"))\n_p(' REFERENCES := %s', table.implode(_MAKE.esc(cfglibs[cfg]), \"/r:\", \"\", \" \"))\n_p(' FLAGS += %s %s', table.implode(cfg.defines, \"/d:\", \"\", \" \"), table.concat(table.join(csc.getflags(cfg), cfg.buildoptions), \" \"))\n_p(' define PREBUILDCMDS')\nif #cfg.prebuildcommands > 0 then\n_p('\\t@echo Running pre-build commands')\n_p('\\t%s', table.implode(cfg.prebuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define PRELINKCMDS')\nif #cfg.prelinkcommands > 0 then\n_p('\\t@echo Running pre-link commands')\n_p('\\t%s', table.implode(cfg.prelinkcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define POSTBUILDCMDS')\nif #cfg.postbuildcommands > 0 then\n_p('\\t@echo Running post-bu"
  730. - "ild commands')\n_p('\\t%s', table.implode(cfg.postbuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p('endif')\n_p('')\nend\n",
  731. + "(prj.configurations[1]:lower()))\n_p('endif')\n_p('')\n_p('ifndef verbose')\n_p(' SILENT = @')\n_p('endif')\n_p('')\n_p('SHELLTYPE := msdos')\n_p('ifeq (,$(ComSpec)$(COMSPEC))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(SHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(MAKESHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('')\n_p('ifeq (posix,$(SHELLTYPE))')\n_p(' MKDIR = $(SILENT) mkdir -p \"$(1)\"')\n_p(' COPY = $(SILENT) cp -fR \"$(1)\" \"$(2)\"')\n_p('else')\n_p(' MKDIR = $(SILENT) mkdir \"$(subst /,\\\\\\\\,$(1))\" 2> nul')\n_p(' COPY = $(SILENT) copy /Y \"$(subst /,\\\\\\\\,$(1))\" \"$(subst /,\\\\\\\\,$(2))\"')\n_p('endif')\n_p('')\n_p('ifndef CSC')\n_p(' CSC=%s', csc.getcompilervar(prj))\n_p('endif')\n_p('')\n_p('ifndef RESGEN')\n_p(' RESGEN=resgen')\n_p('endif')\n_p('')\nlocal platforms = premake.filterplatforms(prj.solution, premake[_OPTIONS.cc].platforms)\ntable.insert(platforms, 1, \"\")\nfor cfg in premake.each"
  732. + "config(prj) do\npremake.gmake_cs_config(cfg, csc, cfglibs)\nend\n_p('# To maintain compatibility with VS.NET, these values must be set at the project level')\n_p('TARGET := $(TARGETDIR)/%s', _MAKE.esc(prj.buildtarget.name))\n_p('FLAGS += /t:%s %s', csc.getkind(prj):lower(), table.implode(_MAKE.esc(prj.libdirs), \"/lib:\", \"\", \" \"))\n_p('REFERENCES += %s', table.implode(_MAKE.esc(premake.getlinks(prj, \"system\", \"basename\")), \"/r:\", \".dll\", \" \"))\n_p('')\n_p('SOURCES := \\\\')\nfor _, fname in ipairs(sources) do\n_p('\\t%s \\\\', _MAKE.esc(path.translate(fname)))\nend\n_p('')\n_p('EMBEDFILES := \\\\')\nfor _, fname in ipairs(embedded) do\n_p('\\t%s \\\\', getresourcefilename(prj, fname))\nend\n_p('')\n_p('COPYFILES += \\\\')\nfor target, source in pairs(cfgpairs[anycfg]) do\n_p('\\t%s \\\\', target)\nend\nfor target, source in pairs(copypairs) do\n_p('\\t%s \\\\', target)\nend\n_p('')\n_p('SHELLTYPE := msdos')\n_p('ifeq (,$(ComSpec)$(COMSPEC))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p"
  733. + "('ifeq (/bin,$(findstring /bin,$(SHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(MAKESHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('')\n_p('.PHONY: clean prebuild prelink')\n_p('')\n_p('all: $(TARGETDIR) $(OBJDIR) prebuild $(EMBEDFILES) $(COPYFILES) prelink $(TARGET)')\n_p('')\n_p('$(TARGET): $(SOURCES) $(EMBEDFILES) $(DEPENDS)')\n_p('\\t$(SILENT) $(CSC) /nologo /out:$@ $(FLAGS) $(REFERENCES) $(SOURCES) $(patsubst %%,/resource:%%,$(EMBEDFILES))')\n_p('\\t$(POSTBUILDCMDS)')\n_p('')\n_p('$(TARGETDIR):')\npremake.make_mkdirrule(\"$(TARGETDIR)\")\n_p('$(OBJDIR):')\npremake.make_mkdirrule(\"$(OBJDIR)\")\n_p('clean:')\n_p('\\t@echo Cleaning %s', prj.name)\n_p('ifeq (posix,$(SHELLTYPE))')\n_p('\\t$(SILENT) rm -f $(TARGETDIR)/%s.* $(COPYFILES)', prj.buildtarget.basename)\n_p('\\t$(SILENT) rm -rf $(OBJDIR)')\n_p('else')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(TARGETDIR)/%s.*) del $(subst /,\\\\\\\\,$(TARGETDIR)/%s.*)', prj.buildtarget.basename, prj.buildtarget.b"
  734. + "asename)\nfor target, source in pairs(cfgpairs[anycfg]) do\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,%s) del $(subst /,\\\\\\\\,%s)', target, target)\nend\nfor target, source in pairs(copypairs) do\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,%s) del $(subst /,\\\\\\\\,%s)', target, target)\nend\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(OBJDIR)) rmdir /s /q $(subst /,\\\\\\\\,$(OBJDIR))')\n_p('endif')\n_p('')\n_p('prebuild:')\n_p('\\t$(PREBUILDCMDS)')\n_p('')\n_p('prelink:')\n_p('\\t$(PRELINKCMDS)')\n_p('')\n_p('# Per-configuration copied file rules')\nfor cfg in premake.eachconfig(prj) do\n_p('ifneq (,$(findstring %s,$(config)))', _MAKE.esc(cfg.name:lower()))\nfor target, source in pairs(cfgpairs[cfg]) do\npremake.make_copyrule(source, target)\nend\n_p('endif')\n_p('')\nend\n_p('# Copied file rules')\nfor target, source in pairs(copypairs) do\npremake.make_copyrule(source, target)\nend\n_p('# Embedded file rules')\nfor _, fname in ipairs(embedded) do \nif path.getextension(fname) == \".resx\" then\n"
  735. + "_p('%s: %s', getresourcefilename(prj, fname), _MAKE.esc(fname))\n_p('\\t$(SILENT) $(RESGEN) $^ $@')\nend\n_p('')\nend\nend\nfunction premake.gmake_cs_config(cfg, csc, cfglibs)\n_p('ifneq (,$(findstring %s,$(config)))', _MAKE.esc(cfg.name:lower()))\n_p(' TARGETDIR := %s', _MAKE.esc(cfg.buildtarget.directory))\n_p(' OBJDIR := %s', _MAKE.esc(cfg.objectsdir))\n_p(' DEPENDS := %s', table.concat(_MAKE.esc(premake.getlinks(cfg, \"dependencies\", \"fullpath\")), \" \"))\n_p(' REFERENCES := %s', table.implode(_MAKE.esc(cfglibs[cfg]), \"/r:\", \"\", \" \"))\n_p(' FLAGS += %s %s', table.implode(cfg.defines, \"/d:\", \"\", \" \"), table.concat(table.join(csc.getflags(cfg), cfg.buildoptions), \" \"))\n_p(' define PREBUILDCMDS')\nif #cfg.prebuildcommands > 0 then\n_p('\\t@echo Running pre-build commands')\n_p('\\t%s', table.implode(cfg.prebuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define PRELINKCMDS')\nif #cfg.prelinkcommands > 0 then\n_p('\\t@echo Running pre-link commands')\n_p('\\"
  736. + "t%s', table.implode(cfg.prelinkcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define POSTBUILDCMDS')\nif #cfg.postbuildcommands > 0 then\n_p('\\t@echo Running post-build commands')\n_p('\\t%s', table.implode(cfg.postbuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p('endif')\n_p('')\nend\n",
  737.  
  738. /* actions/vstudio/_vstudio.lua */
  739. "premake.vstudio = { }\nlocal toolsets = {\nvs2010 = \"v100\",\nvs2012 = \"v110\",\nvs2013 = \"v120\",\nvs2015 = \"v140\"\n}\npremake.vstudio.toolset = toolsets[_ACTION] or \"unknown?\"\npremake.vstudio.splashpath = ''\nlocal vstudio = premake.vstudio\nvstudio.platforms = {\nany = \"Any CPU\",\nmixed = \"Mixed Platforms\",\nNative = \"Win32\",\nx86 = \"x86\",\nx32 = \"Win32\",\nx64 = \"x64\",\nPS3 = \"PS3\",\nXbox360 = \"Xbox 360\",\nARM = \"ARM\",\nOrbis= \"Orbis\"\n}\nfunction vstudio.arch(prj)\nif (prj.language == \"C#\") then\nreturn \"Any CPU\"\nelse\nreturn \"Win32\"\nend\nend\nfunction vstudio.iswinrt()\nreturn vstudio.storeapp ~= nil and vstudio.storeapp ~= ''\nend\nfunction vstudio.buildconfigs(sln)\nlocal cfgs = { }\nlocal platforms = premake.filterplatforms(sln, vstudio.platforms, \"Native\")\nlocal hascpp = premake.hascppproject(sln)\nlocal hasdotnet = premake.hasdotnetproject(sln)\nif hasdotnet and (_ACTION > \"vs2008\" or hascpp) then\ntable.insert(platforms, 1, \"mix"
  740. diff -uNr -b 3rdparty/unittest-cpp/UnitTest++/Config.h.org 3rdparty/unittest-cpp/UnitTest++/Config.h
  741. --- 3rdparty/unittest-cpp/UnitTest++/Config.h.org 2015-07-29 10:23:16.000000000 +0900
  742. +++ 3rdparty/unittest-cpp/UnitTest++/Config.h 2015-07-30 17:04:46.000000000 +0900
  743. @@ -20,7 +20,8 @@
  744. #endif
  745.  
  746. #if defined(unix) || defined(__unix__) || defined(__unix) || defined(linux) || \
  747. - defined(__APPLE__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
  748. + defined(__APPLE__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || \
  749. + defined(__OS2__)
  750. #define UNITTEST_POSIX
  751. #endif
  752.  
  753. diff -uNr -b scripts/toolchain.lua.org scripts/toolchain.lua
  754. --- scripts/toolchain.lua.org 2015-07-29 10:23:20.000000000 +0900
  755. +++ scripts/toolchain.lua 2015-07-30 16:34:42.000000000 +0900
  756. @@ -25,6 +25,7 @@
  757. { "nacl", "Native Client" },
  758. { "nacl-arm", "Native Client - ARM" },
  759. { "netbsd", "NetBSD" },
  760. + { "os2", "OS/2" },
  761. { "osx", "OSX (GCC compiler)" },
  762. { "osx-clang", "OSX (Clang compiler)" },
  763. { "pnacl", "Native Client - PNaCl" },
  764. @@ -310,6 +311,10 @@
  765. if "rpi" == _OPTIONS["gcc"] then
  766. location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-rpi")
  767. end
  768. +
  769. + if "os2" == _OPTIONS["gcc"] then
  770. + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-os2")
  771. + end
  772. elseif _ACTION == "vs2012" or _ACTION == "vs2013" or _ACTION == "vs2015" then
  773.  
  774. if (_ACTION .. "-clang") == _OPTIONS["vs"] then
  775. @@ -857,6 +862,15 @@
  776. targetdir (_buildDir .. "rpi" .. "/bin")
  777. objdir (_buildDir .. "rpi" .. "/obj")
  778.  
  779. + configuration { "os2" }
  780. + objdir (_buildDir .. "os2" .. "/obj")
  781. +
  782. + configuration { "os2", "Release" }
  783. + targetdir (_buildDir .. "os2" .. "/bin/Release")
  784. +
  785. + configuration { "os2", "Debug" }
  786. + targetdir (_buildDir .. "os2" .. "/bin/Debug")
  787. +
  788. configuration {} -- reset configuration
  789.  
  790. return true
  791. @@ -919,6 +933,12 @@
  792. -- ALLOW_MEMORY_GROWTH
  793. }
  794.  
  795. + configuration { "os2", "Release" }
  796. + postbuildcommands {
  797. + "$(SILENT) echo Stripping symbols.",
  798. + "$(SILENT) lxlite /B- /L- /CS \"$(TARGET)\""
  799. + }
  800. +
  801. configuration {} -- reset configuration
  802. end
  803.  
  804. diff -uNr -b scripts/src/osd/sdl_cfg.lua.org scripts/src/osd/sdl_cfg.lua
  805. --- scripts/src/osd/sdl_cfg.lua.org 2015-07-29 10:23:18.000000000 +0900
  806. +++ scripts/src/osd/sdl_cfg.lua 2015-07-30 16:33:06.000000000 +0900
  807. @@ -144,6 +144,9 @@
  808. "-isystem /usr/local/include",
  809. }
  810. elseif _OPTIONS["targetos"]=="os2" then
  811. + defines {
  812. + "SDLMAME_OS2",
  813. + }
  814. buildoptions {
  815. backtick(sdlconfigcmd() .. " --cflags"),
  816. }
  817. diff -uNr -b src/emu/cpu/h6280/6280dasm.c.org src/emu/cpu/h6280/6280dasm.c
  818. --- src/emu/cpu/h6280/6280dasm.c.org 2015-07-29 10:23:22.000000000 +0900
  819. +++ src/emu/cpu/h6280/6280dasm.c 2015-07-30 16:33:06.000000000 +0900
  820. @@ -18,6 +18,11 @@
  821.  
  822. ******************************************************************************/
  823.  
  824. +#ifdef __OS2__
  825. +/* To avoid name clash of _brk */
  826. +#define __STRICT_ANSI__
  827. +#endif
  828. +
  829. #include "emu.h"
  830.  
  831. #define RDOP(addr) (oprom[addr - pc])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement