home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Graphics / Graphics.zip / gotch175.zip / makefile < prev    next >
Makefile  |  2002-11-25  |  7KB  |  191 lines

  1. #
  2. # Gotcha makefile
  3. #
  4.  
  5. # set this to something if debug version should be created
  6. DEBUG  = 
  7.  
  8. # adjust this as desired/required
  9. CFLAGS = -g -Wall -fno-exceptions -fno-rtti
  10. CC     = gcc $(CFLAGS)
  11. I      = e:/prog/emx/include/
  12.  
  13. # where the various files are (to be) kept; no trailing slashes please!
  14. SRC    = src
  15. TMP    = tmp
  16. OUT    = out
  17. DATA   = $(SRC)/data
  18.  
  19. # -------------------------------------------------------------------------
  20.  
  21. .IF $(DEBUG)
  22.     o=o
  23.     $(TMP)/%.$(o) : $(SRC)/%.cpp ; $(CC) -o $@ -c $<
  24. .ELSE
  25.     o=obj
  26.     $(TMP)/%.$(o) : $(SRC)/%.cpp ; $(CC) -o $@ -Zomf -Zsys -O2 -c $<
  27. .END
  28.  
  29. # -- 'big' targes ---------------------------------------------------------
  30.  
  31. default:      all
  32. all:          gotcha dll ressources
  33.  
  34. distr .IGNORE:  all
  35.     copy "$(OUT)\*.dll" "distr"
  36.     copy "$(OUT)\*.hlp" "distr"
  37.     copy "$(OUT)\*.exe" "distr"
  38.     del "distr\*~"
  39.     del "distr\*.INI"
  40.  
  41. dll:          $(OUT)/gotcha.dll
  42. ressources:   english portbras deutsch czech italiano
  43.  
  44. english:      $(OUT)\english.dll $(OUT)/english.hlp
  45. portbras:     $(OUT)\portbras.dll $(OUT)/portbras.hlp
  46. deutsch:      $(OUT)\deutsch.dll
  47. czech:        $(OUT)\czech.dll
  48. italiano:     $(OUT)\italiano.dll $(OUT)/italiano.hlp
  49.  
  50. # -- 'small' targets ------------------------------------------------------
  51.  
  52. gotcha: $(OUT)/gotcha.exe
  53.  
  54. $(OUT)/gotcha.exe:      $(TMP)/gotcha.$(o) \
  55.                         $(TMP)/about.$(o) \
  56.                         $(TMP)/helper.$(o) \
  57.                         $(TMP)/rstring.$(o) \
  58.                         $(TMP)/mmio.$(o) \
  59.                         $(TMP)/settings.$(o) \
  60.                         $(SRC)/gotcha.def \
  61.                         $(TMP)/gotcha.lib \
  62.                         $(TMP)/gotcha.res
  63. .IF $(DEBUG)
  64.     $(CC) -o $(OUT)/gotcha -Zmt -lstdcpp $(TMP)/*.$(o) $(SRC)/gotcha.def
  65.     emxbind -bpq e:/prog/emx/bin/emxl $(OUT)/gotcha
  66. # FIXME the above is probably totally wrong now ...
  67. .ELSE
  68.     $(CC) -o $(OUT)/gotcha.exe -Zomf -Zsys -Zmt -s -lstdcpp -lmmpm2 $<
  69. .END
  70.  
  71. $(TMP)/gotcha.res:      $(SRC)/gotcha.rc $(SRC)/gotcha.ico
  72.     rc -r "$(SRC)/gotcha.rc" "$@"
  73.  
  74. $(OUT)/gotcha.dll:      $(SRC)/dll/gotchdll.c $(SRC)/dll/gotchdll.def
  75.     $(CC) -o $(OUT)/gotcha.dll -Zomf -Zsys -Zdll -Zmt $<
  76.  
  77. $(TMP)/gotcha.lib:      $(SRC)/dll/gotchdll.def
  78.     emximp -o $(TMP)/gotcha.lib $(SRC)/dll/gotchdll.def
  79.  
  80. #$(TMP)/gotcha.$(o):     $(SRC)/gotcha.h \
  81. #            $(SRC)/gotcha.cpp \
  82. #            $(SRC)/mainwin.cpp \
  83. #                        $(SRC)/snapshot.cpp \
  84. #                        $(SRC)/bitmap.cpp \
  85. #                        $(SRC)/savebmp.cpp
  86.  
  87. $(TMP)/helper.$(o):     $(SRC)/version.h $(SRC)/helper.cpp
  88.  
  89. # -- language ressources --------------------------------------------------
  90.  
  91. $(OUT)\english.dll:     $(TMP)/english.res \
  92.                         $(SRC)/english/english.def \
  93.                         $(SRC)/dll.obj
  94.     link386 /nologo $(SRC)\dll, $@ /align:16, nul,, $(SRC)\english\english.def
  95.     rc $(TMP)/english.res $@
  96.     eautil $@ e:\tmp\dll.ea /s
  97.     del "e:\tmp\dll.ea"
  98.  
  99. $(TMP)/english.res:     $(SRC)/english/english.rc \
  100.                         $(SRC)/id.h \
  101.                         $(SRC)/common.rc \
  102.                         $(SRC)/version.h
  103.     rc -i $I -i $(SRC) -cc 1 -cp 850 -r $(SRC)/english/english.rc $@
  104.  
  105. $(OUT)/english.hlp:     $(SRC)/english/english.ipf $(SRC)/common.ipf \
  106.                         $(DATA)/teamlogo.bmp $(DATA)/rosaleen.bmp \
  107.                         $(DATA)/gotcha.bmp
  108.     ipfc /D:001 /C:850 $(SRC)/english/english.ipf $@
  109.  
  110. # -------------------------------------------------------------------------
  111.  
  112. $(OUT)\portbras.dll:     $(TMP)/portbras.res \
  113.                         $(SRC)/portbras/portbras.def \
  114.                         $(SRC)/dll.obj
  115.     link386 /nologo $(SRC)\dll, $@ /align:16, nul,, $(SRC)\portbras\portbras.def
  116.     rc $(TMP)/portbras.res $@
  117.     eautil $@ e:\tmp\dll.ea /s
  118.     del "e:\tmp\dll.ea"
  119.  
  120. $(TMP)/portbras.res:     $(SRC)/portbras/portbras.rc \
  121.                         $(SRC)/id.h \
  122.                         $(SRC)/common.rc \
  123.                         $(SRC)/version.h
  124.     rc -i $I -i $(SRC) -cc 55 -cp 850 -r $(SRC)/portbras/portbras.rc $@
  125.  
  126. $(OUT)/portbras.hlp:     $(SRC)/portbras/portbras.ipf $(SRC)/common.ipf \
  127.                         $(DATA)/teamlogo.bmp $(DATA)/rosaleen.bmp \
  128.                         $(DATA)/gotcha.bmp
  129.     ipfc /D:055 /C:850 $(SRC)/portbras/portbras.ipf $@
  130.  
  131. # -------------------------------------------------------------------------
  132.  
  133. $(OUT)\deutsch.dll:     $(TMP)/deutsch.res \
  134.                         $(SRC)/deutsch/deutsch.def \
  135.                         $(SRC)/dll.obj
  136.     link386 /nologo $(SRC)\dll, $@ /align:16, nul,, $(SRC)\deutsch\deutsch.def
  137.     rc $(TMP)/deutsch.res $@
  138.     eautil $@ e:\tmp\dll.ea /s
  139.     del "e:\tmp\dll.ea"
  140.  
  141. $(TMP)/deutsch.res:     $(SRC)/deutsch/deutsch.rc \
  142.                         $(SRC)/id.h \
  143.                         $(SRC)/common.rc \
  144.                         $(SRC)/version.h
  145.     rc -i $I -i $(SRC) -cc 49 -cp 850 -r $(SRC)/deutsch/deutsch.rc $@
  146.  
  147. # -------------------------------------------------------------------------
  148.  
  149. $(OUT)\czech.dll:     $(TMP)/czech.res \
  150.                         $(SRC)/czech/czech.def \
  151.                         $(SRC)/dll.obj
  152.     link386 /nologo $(SRC)\dll, $@ /align:16, nul,, $(SRC)\czech\czech.def
  153.     rc $(TMP)/czech.res $@
  154.     eautil $@ e:\tmp\dll.ea /s
  155.     del "e:\tmp\dll.ea"
  156.  
  157. $(TMP)/czech.res:     $(SRC)/czech/czech.rc \
  158.                         $(SRC)/id.h \
  159.                         $(SRC)/common.rc \
  160.                         $(SRC)/version.h
  161.     rc -i $I -i $(SRC) -cc 421 -cp 852 -r $(SRC)/czech/czech.rc $@
  162.  
  163. # -------------------------------------------------------------------------
  164.  
  165. # where the various files are (to be) kept; no trailing slashes please!
  166. #SRC    = 
  167. #TMP    = 
  168. #OUT    = 
  169. #DATA   = $(SRC)/data
  170.  
  171. $(OUT)\italiano.dll:     $(TMP)/italiano.res \
  172.                         $(SRC)/italiano/italiano.def \
  173.                         $(SRC)/dll.obj
  174.     link386 /nologo $(SRC)\dll, $@ /align:16, nul,, $(SRC)\italiano\italiano.def
  175.     rc $(TMP)/italiano.res $@
  176.     eautil $@ e:\tmp\dll.ea /s
  177.     del "e:\tmp\dll.ea"
  178.  
  179. $(TMP)/italiano.res:     $(SRC)/italiano/italiano.rc \
  180.                         $(SRC)/id.h \
  181.                         $(SRC)/common.rc \
  182.                         $(SRC)/version.h
  183.     rc -i $I -i $(SRC) -r $(SRC)/italiano/italiano.rc $@
  184.  
  185. $(OUT)/italiano.hlp:     $(SRC)/italiano/italiano.ipf $(SRC)/common.ipf \
  186.                         $(DATA)/teamlogo.bmp $(DATA)/rosaleen.bmp \
  187.                         $(DATA)/gotcha.bmp
  188.     ipfc /D:001 /C:850 $(SRC)/italiano/italiano.ipf $@
  189.  
  190. # -------------------------------------------------------------------------
  191.