Advertisement
Guest User

Mod'd makefile for QEU on Linux

a guest
Sep 7th, 2014
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.01 KB | None | 0 0
  1. #
  2. # Copyright (C) 1996 by Raphael Quinet. All rights reserved.
  3. #
  4. # Permission to use, copy, modify, and distribute this software and
  5. # its documentation for any purpose and without fee is hereby
  6. # granted, provided that the above copyright notice appear in all
  7. # copies and that both that copyright notice and this permission
  8. # notice appear in supporting documentation. If more than a few
  9. # lines of this code are used in a program which displays a copyright
  10. # notice or credit notice, the following acknowledgment must also be
  11. # displayed on the same screen: "This product includes software
  12. # developed by Raphael Quinet for use in the Quake Editing Utilities
  13. # project." THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR
  14. # IMPLIED WARRANTY.
  15. #
  16. # More information about the QEU project can be found on the WWW:
  17. # "http://www.montefiore.ulg.ac.be/~quinet/games/editing.html" or by
  18. # mail: Raphael Quinet, 9 rue des Martyrs, B-4550 Nandrin, Belgium.
  19. #
  20.  
  21. #
  22. # Define your C compiler here: cc, gcc, bcc or other.
  23. #
  24. CC = gcc
  25.  
  26. #
  27. # Options for your C compiler.
  28. #
  29. CFLAGS = -O2 -ansi -Wall -m32
  30. #CFLAGS = -g -ansi -Wall -DDEBUG
  31.  
  32. # File prefixes:
  33. # q_* the core of QEU: file management functions, object structures, etc.
  34. # f_* Filters for various file formats (PACK, WAD, WAD2, ...).
  35. # g_* Graphics stuff.
  36.  
  37. PROGS = unpak repak unwad2 rewad2 unwad rewad unbsp sprview
  38. PROGS.DOS = unpak.exe repak.exe unwad2.exe rewad2.exe unwad.exe rewad.exe unbsp.exe sprview.exe
  39.  
  40. SRCS1 = q_misc.c q_files.c f_pack.c unpak.c
  41. OBJS1 = $(SRCS1:.c=.o)
  42.  
  43. SRCS2 = q_misc.c q_files.c f_pack.c repak.c
  44. OBJS2 = $(SRCS2:.c=.o)
  45.  
  46. SRCS3 = q_misc.c q_files.c f_wad2.c f_bitmap.c unwad2.c
  47. OBJS3 = $(SRCS3:.c=.o)
  48.  
  49. SRCS4 = q_misc.c q_files.c f_wad2.c f_bitmap.c rewad2.c
  50. OBJS4 = $(SRCS4:.c=.o)
  51.  
  52. SRCS5 = q_misc.c q_files.c f_wad.c unwad.c
  53. OBJS5 = $(SRCS5:.c=.o)
  54.  
  55. SRCS6 = q_misc.c q_files.c f_wad.c rewad.c
  56. OBJS6 = $(SRCS6:.c=.o)
  57.  
  58. SRCS7 = q_misc.c q_files.c f_bsp.c unbsp.c
  59. OBJS7 = $(SRCS7:.c=.o)
  60.  
  61. SRCSS = q_misc.c q_files.c f_bitmap.c f_sprite.c sprview.c
  62. OBJSS = $(SRCSS:.c=.o)
  63.  
  64. LIBS =
  65.  
  66. #all.dos: $(PROGS.DOS)
  67.  
  68. all: $(PROGS)
  69.  
  70. # temporary
  71. sprview: $(OBJSS)
  72. $(CC) $(CFLAGS) -o sprview $(OBJSS) $(LIBS)
  73.  
  74. sprview.exe: sprview
  75. del sprview.exe
  76. strip sprview
  77. coff2exe sprview
  78.  
  79. unpak: $(OBJS1)
  80. $(CC) $(CFLAGS) -o unpak $(OBJS1) $(LIBS)
  81.  
  82. unpak.exe: unpak
  83. del unpak.exe
  84. strip unpak
  85. coff2exe unpak
  86.  
  87. repak: $(OBJS2)
  88. $(CC) $(CFLAGS) -o repak $(OBJS2) $(LIBS)
  89.  
  90. repak.exe: repak
  91. del repak.exe
  92. strip repak
  93. coff2exe repak
  94.  
  95. unwad2: $(OBJS3)
  96. $(CC) $(CFLAGS) -o unwad2 $(OBJS3) $(LIBS)
  97.  
  98. unwad2.exe: unwad2
  99. del unwad2.exe
  100. strip unwad2
  101. coff2exe unwad2
  102.  
  103. rewad2: $(OBJS4)
  104. $(CC) $(CFLAGS) -o rewad2 $(OBJS4) $(LIBS)
  105.  
  106. rewad2.exe: rewad2
  107. del rewad2.exe
  108. strip rewad2
  109. coff2exe rewad2
  110.  
  111. unwad: $(OBJS5)
  112. $(CC) $(CFLAGS) -o unwad $(OBJS5) $(LIBS)
  113.  
  114. unwad.exe: unwad
  115. del unwad.exe
  116. strip unwad
  117. coff2exe unwad
  118.  
  119. rewad: $(OBJS6)
  120. $(CC) $(CFLAGS) -o rewad $(OBJS6) $(LIBS)
  121.  
  122. rewad.exe: rewad
  123. del rewad.exe
  124. strip rewad
  125. coff2exe rewad
  126.  
  127. unbsp: $(OBJS7)
  128. $(CC) $(CFLAGS) -o unbsp $(OBJS7) $(LIBS)
  129.  
  130. unbsp.exe: unbsp
  131. del unbsp.exe
  132. strip unbsp
  133. coff2exe unbsp
  134.  
  135. clean:
  136. $(RM) *.o *~ *.bak
  137.  
  138. distclean: clean
  139. $(RM) $(PROGS)
  140.  
  141. clean.dos:
  142. -del *.o
  143. -del *.obj
  144.  
  145. lint:
  146. $(LINT) $(SRCS1) $(LIBS)
  147. $(LINT) $(SRCS2) $(LIBS)
  148. $(LINT) $(SRCS3) $(LIBS)
  149. $(LINT) $(SRCS4) $(LIBS)
  150. $(LINT) $(SRCS5) $(LIBS)
  151. $(LINT) $(SRCS6) $(LIBS)
  152. $(LINT) $(SRCS7) $(LIBS)
  153.  
  154. check:
  155. @echo There are some problems left in these files:
  156. @grep \\\/\\\*\! *.[ch]
  157.  
  158. check.dos:
  159. @echo There are some problems left in these files:
  160. @grep /\\\*! *.h
  161. @grep /\\\*! *.c
  162.  
  163. depend:
  164. (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \
  165. for i in $(SRCS1) $(SRCS2) $(SRCS3) $(SRCS4) ;\
  166. do /lib/cpp -D__UNIX__ -M $$i ;\
  167. done | sed 's/:[ ]\.\//: /; /\/usr\/include/d; s/ / /g' \
  168. | sort | uniq
  169. ) > Makefile.new
  170. mv Makefile Makefile.bak
  171. mv Makefile.new Makefile
  172.  
  173. # DO NOT DELETE THIS LINE -- make depend depends on it.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement