makefile 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. CFLAGS = -c
  2. LDFLAGS =
  3. ODIR = baddir
  4. EXEBASE = quake2
  5. EXE = $(ODIR)/quake2
  6. all: $(EXE)
  7. #----------------------------------------------------------------------
  8. SERVERFILES = $(ODIR)/sv_ccmds.o $(ODIR)/sv_ents.o $(ODIR)/sv_game.o $(ODIR)/sv_init.o $(ODIR)/sv_main.o $(ODIR)/sv_send.o $(ODIR)/sv_user.o $(ODIR)/sv_world.o
  9. CLIENTFILES = $(ODIR)/cl_demo.o $(ODIR)/cl_ents.o $(ODIR)/cl_fx.o $(ODIR)/cl_input.o $(ODIR)/cl_inv.o $(ODIR)/cl_main.o $(ODIR)/cl_parse.o $(ODIR)/cl_tent.o $(ODIR)/console.o $(ODIR)/keys.o $(ODIR)/menu.o $(ODIR)/qmenu.o $(ODIR)/screen.o $(ODIR)/scr_cin.o $(ODIR)/snd_dma.o $(ODIR)/snd_mem.o $(ODIR)/snd_mix.o $(ODIR)/view.o
  10. # commonfiles are used by both client and server
  11. COMMONFILES = $(ODIR)/cmd.o $(ODIR)/cmodel.o $(ODIR)/cvar.o $(ODIR)/files.o $(ODIR)/md4.o $(ODIR)/net_chan.o $(ODIR)/net_udp.o
  12. REFGLFILES = $(ODIR)/gl_draw.o $(ODIR)/gl_inter.o $(ODIR)/gl_light.o $(ODIR)/gl_math.o $(ODIR)/gl_mesh.o $(ODIR)/gl_model.o $(ODIR)/gl_rmain.o $(ODIR)/gl_rmisc.o $(ODIR)/gl_rsurf.o $(ODIR)/gl_textr.o $(ODIR)/gl_warp.
  13. REFSOFTFILES = $(ODIR)/r_aclip.o $(ODIR)/r_alias.o $(ODIR)/r_bsp.o $(ODIR)/r_draw.o $(ODIR)/r_edge.o $(ODIR)/r_image.o $(ODIR)/r_light.o $(ODIR)/r_main.o $(ODIR)/r_misc.o $(ODIR)/r_model.o $(ODIR)/r_part.o $(ODIR)/r_polyse.o $(ODIR)/r_poly.o $(ODIR)/r_rast.o $(ODIR)/r_scan.o $(ODIR)/r_sprite.o $(ODIR)/r_surf.o
  14. # sharedfiles are included in EVERY dll
  15. SHAREDFILES = $(ODIR)/q_shared
  16. #----------------------------------------------------------------------
  17. _next:
  18. make "CFLAGS = -c -Wall -g -O" "ODIR = next"
  19. _irix:
  20. make "CFLAGS = -c -O2 -Xcpluscomm -woff 513 -woff 594 -woff 596" "LDFLAGS = -Ofast=ip32_10k" "ODIR = irix"
  21. _irixdebug:
  22. make "CFLAGS = -c -O2 -g -Xcpluscomm" "LDFLAGS = -g" "ODIR = irix"
  23. clean:
  24. rm -f next/*.o next/$(EXEBASE)
  25. rm -f irix/*.o irix/$(EXEBASE)
  26. #----------------------------------------------------------------------
  27. FILES = $(SERVERFILES) $(COMMONFILES) $(CLIENTFILES) $(REFSOFTFILES) $(SHAREDFILES)
  28. $(EXE) : $(FILES)
  29. cc -o $(EXE) $(LDFLAGS) $(FILES) -lm
  30. #----------------------------------------------------------------------
  31. $(ODIR)/q_shared.o : ../qcommon/q_shared.c
  32. cc $(CFLAGS) -o $@ $?
  33. #----------------------------------------------------------------------
  34. $(ODIR)/sv_ccmds.o : ../server/sv_ccmds.c
  35. cc $(CFLAGS) -o $@ $?
  36. $(ODIR)/sv_ents.o : ../server/sv_ents.c
  37. cc $(CFLAGS) -o $@ $?
  38. $(ODIR)/sv_game.o : ../server/sv_game.c
  39. cc $(CFLAGS) -o $@ $?
  40. $(ODIR)/sv_init.o : ../server/sv_init.c
  41. cc $(CFLAGS) -o $@ $?
  42. $(ODIR)/sv_main.o : ../server/sv_main.c
  43. cc $(CFLAGS) -o $@ $?
  44. $(ODIR)/sv_send.o : ../server/sv_send.c
  45. cc $(CFLAGS) -o $@ $?
  46. $(ODIR)/sv_user.o : ../server/sv_user.c
  47. cc $(CFLAGS) -o $@ $?
  48. $(ODIR)/sv_world.o : ../server/sv_world.c
  49. cc $(CFLAGS) -o $@ $?
  50. #----------------------------------------------------------------------
  51. $(ODIR)/cl_demo.o : ../client/cl_demo.c
  52. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  53. cc $(CFLAGS) -o $@ /tmp/temp.i
  54. $(ODIR)/cl_ents.o : ../client/cl_ents.c
  55. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  56. cc $(CFLAGS) -o $@ /tmp/temp.i
  57. $(ODIR)/cl_fx.o : ../client/cl_fx.c
  58. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  59. cc $(CFLAGS) -o $@ /tmp/temp.i
  60. $(ODIR)/cl_input.o : ../client/cl_input.c
  61. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  62. cc $(CFLAGS) -o $@ /tmp/temp.i
  63. $(ODIR)/cl_inv.o : ../client/cl_inv.c
  64. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  65. cc $(CFLAGS) -o $@ /tmp/temp.i
  66. $(ODIR)/cl_main.o : ../client/cl_main.c
  67. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  68. cc $(CFLAGS) -o $@ /tmp/temp.i
  69. $(ODIR)/cl_parse.o : ../client/cl_parse.c
  70. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  71. cc $(CFLAGS) -o $@ /tmp/temp.i
  72. $(ODIR)/cl_tent.o : ../client/cl_tent.c
  73. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  74. cc $(CFLAGS) -o $@ /tmp/temp.i
  75. $(ODIR)/console.o : ../client/console.c
  76. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  77. cc $(CFLAGS) -o $@ /tmp/temp.i
  78. $(ODIR)/keys.o : ../client/keys.c
  79. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  80. cc $(CFLAGS) -o $@ /tmp/temp.i
  81. $(ODIR)/menu.o : ../client/menu.c
  82. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  83. cc $(CFLAGS) -o $@ /tmp/temp.i
  84. $(ODIR)/qmenu.o : ../client/qmenu.c
  85. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  86. cc $(CFLAGS) -o $@ /tmp/temp.i
  87. $(ODIR)/sbar2.o : ../client/sbar2.c
  88. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  89. cc $(CFLAGS) -o $@ /tmp/temp.i
  90. $(ODIR)/screen.o : ../client/screen.c
  91. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  92. cc $(CFLAGS) -o $@ /tmp/temp.i
  93. $(ODIR)/scr_cin.o : ../client/scr_cin.c
  94. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  95. cc $(CFLAGS) -o $@ /tmp/temp.i
  96. $(ODIR)/snd_dma.o : ../client/snd_dma.c
  97. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  98. cc $(CFLAGS) -o $@ /tmp/temp.i
  99. $(ODIR)/snd_mem.o : ../client/snd_mem.c
  100. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  101. cc $(CFLAGS) -o $@ /tmp/temp.i
  102. $(ODIR)/snd_mix.o : ../client/snd_mix.c
  103. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  104. cc $(CFLAGS) -o $@ /tmp/temp.i
  105. $(ODIR)/view.o : ../client/view.c
  106. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  107. cc $(CFLAGS) -o $@ /tmp/temp.i
  108. #----------------------------------------------------------------------
  109. $(ODIR)/cmd.o : ../qcommon/cmd.c
  110. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  111. cc $(CFLAGS) -o $@ /tmp/temp.i
  112. $(ODIR)/cmodel.o : ../qcommon/cmodel.c
  113. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  114. cc $(CFLAGS) -o $@ /tmp/temp.i
  115. $(ODIR)/cvar.o : ../qcommon/cvar.c
  116. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  117. cc $(CFLAGS) -o $@ /tmp/temp.i
  118. $(ODIR)/files.o : ../qcommon/files.c
  119. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  120. cc $(CFLAGS) -o $@ /tmp/temp.i
  121. $(ODIR)/md4.o : ../qcommon/md4.c
  122. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  123. cc $(CFLAGS) -o $@ /tmp/temp.i
  124. $(ODIR)/net_chan.o : ../qcommon/net_chan.c
  125. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  126. cc $(CFLAGS) -o $@ /tmp/temp.i
  127. $(ODIR)/net_udp.o : ../qcommon/net_udp.c
  128. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  129. cc $(CFLAGS) -o $@ /tmp/temp.i
  130. $(ODIR)/sys_null.o : ../qcommon/sys_null.c
  131. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  132. cc $(CFLAGS) -o $@ /tmp/temp.i
  133. #----------------------------------------------------------------------
  134. $(ODIR)/gl_draw.o : ../ref_gl/gl_draw.c
  135. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  136. cc $(CFLAGS) -o $@ /tmp/temp.i
  137. $(ODIR)/gl_inter.o : ../ref_gl/gl_inter.c
  138. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  139. cc $(CFLAGS) -o $@ /tmp/temp.i
  140. $(ODIR)/gl_light.o : ../ref_gl/gl_light.c
  141. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  142. cc $(CFLAGS) -o $@ /tmp/temp.i
  143. $(ODIR)/gl_math.o : ../ref_gl/gl_math.c
  144. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  145. cc $(CFLAGS) -o $@ /tmp/temp.i
  146. $(ODIR)/gl_mesh.o : ../ref_gl/gl_mesh.c
  147. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  148. cc $(CFLAGS) -o $@ /tmp/temp.i
  149. $(ODIR)/gl_model.o : ../ref_gl/gl_model.c
  150. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  151. cc $(CFLAGS) -o $@ /tmp/temp.i
  152. $(ODIR)/gl_rmain.o : ../ref_gl/gl_rmain.c
  153. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  154. cc $(CFLAGS) -o $@ /tmp/temp.i
  155. $(ODIR)/gl_rmisc.o : ../ref_gl/gl_rmisc.c
  156. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  157. cc $(CFLAGS) -o $@ /tmp/temp.i
  158. $(ODIR)/gl_rsurf.o : ../ref_gl/gl_rsurf.c
  159. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  160. cc $(CFLAGS) -o $@ /tmp/temp.i
  161. $(ODIR)/gl_textr.o : ../ref_gl/gl_textr.c
  162. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  163. cc $(CFLAGS) -o $@ /tmp/temp.i
  164. $(ODIR)/gl_warp.o : ../ref_gl/gl_warp.c
  165. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  166. cc $(CFLAGS) -o $@ /tmp/temp.i
  167. #----------------------------------------------------------------------
  168. $(ODIR)/r_aclip.o : ../ref_soft/r_aclip.c
  169. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  170. cc $(CFLAGS) -o $@ /tmp/temp.i
  171. $(ODIR)/r_alias.o : ../ref_soft/r_alias.c
  172. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  173. cc $(CFLAGS) -o $@ /tmp/temp.i
  174. $(ODIR)/r_bsp.o : ../ref_soft/r_bsp.c
  175. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  176. cc $(CFLAGS) -o $@ /tmp/temp.i
  177. $(ODIR)/r_draw.o : ../ref_soft/r_draw.c
  178. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  179. cc $(CFLAGS) -o $@ /tmp/temp.i
  180. $(ODIR)/r_edge.o : ../ref_soft/r_edge.c
  181. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  182. cc $(CFLAGS) -o $@ /tmp/temp.i
  183. $(ODIR)/r_image.o : ../ref_soft/r_image.c
  184. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  185. cc $(CFLAGS) -o $@ /tmp/temp.i
  186. $(ODIR)/r_light.o : ../ref_soft/r_light.c
  187. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  188. cc $(CFLAGS) -o $@ /tmp/temp.i
  189. $(ODIR)/r_main.o : ../ref_soft/r_main.c
  190. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  191. cc $(CFLAGS) -o $@ /tmp/temp.i
  192. $(ODIR)/r_misc.o : ../ref_soft/r_misc.c
  193. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  194. cc $(CFLAGS) -o $@ /tmp/temp.i
  195. $(ODIR)/r_model.o : ../ref_soft/r_model.c
  196. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  197. cc $(CFLAGS) -o $@ /tmp/temp.i
  198. $(ODIR)/r_part.o : ../ref_soft/r_part.c
  199. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  200. cc $(CFLAGS) -o $@ /tmp/temp.i
  201. $(ODIR)/r_polyse.o : ../ref_soft/r_polyse.c
  202. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  203. cc $(CFLAGS) -o $@ /tmp/temp.i
  204. $(ODIR)/r_poly.o : ../ref_soft/r_poly.c
  205. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  206. cc $(CFLAGS) -o $@ /tmp/temp.i
  207. $(ODIR)/r_rast.o : ../ref_soft/r_rast.c
  208. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  209. cc $(CFLAGS) -o $@ /tmp/temp.i
  210. $(ODIR)/r_scan.o : ../ref_soft/r_scan.c
  211. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  212. cc $(CFLAGS) -o $@ /tmp/temp.i
  213. $(ODIR)/r_sprite.o : ../ref_soft/r_sprite.c
  214. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  215. cc $(CFLAGS) -o $@ /tmp/temp.i
  216. $(ODIR)/r_surf.o : ../ref_soft/r_surf.c
  217. cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
  218. cc $(CFLAGS) -o $@ /tmp/temp.i
  219. #----------------------------------------------------------------------