| [2] | 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)/settings.$(o) \ | 
|---|
|  | 59 | $(SRC)/gotcha.def \ | 
|---|
|  | 60 | $(TMP)/gotcha.lib \ | 
|---|
|  | 61 | $(TMP)/gotcha.res | 
|---|
|  | 62 | .IF $(DEBUG) | 
|---|
|  | 63 | $(CC) -o $(OUT)/gotcha -Zmt -lstdcpp $(TMP)/*.$(o) $(SRC)/gotcha.def | 
|---|
|  | 64 | emxbind -bpq e:/prog/emx/bin/emxl $(OUT)/gotcha | 
|---|
|  | 65 | # FIXME the above is probably totally wrong now ... | 
|---|
|  | 66 | .ELSE | 
|---|
|  | 67 | $(CC) -o $(OUT)/gotcha.exe -Zomf -Zsys -Zmt -s -lstdcpp -lmmpm2 $< | 
|---|
|  | 68 | .END | 
|---|
|  | 69 |  | 
|---|
|  | 70 | $(TMP)/gotcha.res:      $(SRC)/gotcha.rc $(SRC)/gotcha.ico | 
|---|
|  | 71 | rc -r "$(SRC)/gotcha.rc" "$@" | 
|---|
|  | 72 |  | 
|---|
|  | 73 | $(OUT)/gotcha.dll:      $(SRC)/dll/gotchdll.c $(SRC)/dll/gotchdll.def | 
|---|
|  | 74 | $(CC) -o $(OUT)/gotcha.dll -Zomf -Zsys -Zdll -Zmt $< | 
|---|
|  | 75 |  | 
|---|
|  | 76 | $(TMP)/gotcha.lib:      $(SRC)/dll/gotchdll.def | 
|---|
|  | 77 | emximp -o $(TMP)/gotcha.lib $(SRC)/dll/gotchdll.def | 
|---|
|  | 78 |  | 
|---|
|  | 79 | #$(TMP)/gotcha.$(o):     $(SRC)/gotcha.h \ | 
|---|
|  | 80 | #                       $(SRC)/gotcha.cpp \ | 
|---|
|  | 81 | #                       $(SRC)/mainwin.cpp \ | 
|---|
|  | 82 | #                        $(SRC)/snapshot.cpp \ | 
|---|
|  | 83 | #                        $(SRC)/bitmap.cpp \ | 
|---|
|  | 84 | #                        $(SRC)/savebmp.cpp | 
|---|
|  | 85 |  | 
|---|
|  | 86 | $(TMP)/helper.$(o):     $(SRC)/version.h $(SRC)/helper.cpp | 
|---|
|  | 87 |  | 
|---|
|  | 88 | # -- language ressources -------------------------------------------------- | 
|---|
|  | 89 |  | 
|---|
|  | 90 | $(OUT)\english.dll:     $(TMP)/english.res \ | 
|---|
|  | 91 | $(SRC)/english/english.def \ | 
|---|
|  | 92 | $(SRC)/dll.obj | 
|---|
|  | 93 | link386 /nologo $(SRC)\dll, $@ /align:16, nul,, $(SRC)\english\english.def | 
|---|
|  | 94 | rc $(TMP)/english.res $@ | 
|---|
|  | 95 | eautil $@ e:\tmp\dll.ea /s | 
|---|
|  | 96 | del "e:\tmp\dll.ea" | 
|---|
|  | 97 |  | 
|---|
|  | 98 | $(TMP)/english.res:     $(SRC)/english/english.rc \ | 
|---|
|  | 99 | $(SRC)/id.h \ | 
|---|
|  | 100 | $(SRC)/common.rc \ | 
|---|
|  | 101 | $(SRC)/version.h | 
|---|
|  | 102 | rc -i $I -i $(SRC) -cc 1 -cp 850 -r $(SRC)/english/english.rc $@ | 
|---|
|  | 103 |  | 
|---|
|  | 104 | $(OUT)/english.hlp:     $(SRC)/english/english.ipf $(SRC)/common.ipf \ | 
|---|
|  | 105 | $(DATA)/teamlogo.bmp $(DATA)/rosaleen.bmp \ | 
|---|
|  | 106 | $(DATA)/gotcha.bmp | 
|---|
|  | 107 | ipfc /D:001 /C:850 $(SRC)/english/english.ipf $@ | 
|---|
|  | 108 |  | 
|---|
|  | 109 | # ------------------------------------------------------------------------- | 
|---|
|  | 110 |  | 
|---|
|  | 111 | $(OUT)\portbras.dll:     $(TMP)/portbras.res \ | 
|---|
|  | 112 | $(SRC)/portbras/portbras.def \ | 
|---|
|  | 113 | $(SRC)/dll.obj | 
|---|
|  | 114 | link386 /nologo $(SRC)\dll, $@ /align:16, nul,, $(SRC)\portbras\portbras.def | 
|---|
|  | 115 | rc $(TMP)/portbras.res $@ | 
|---|
|  | 116 | eautil $@ e:\tmp\dll.ea /s | 
|---|
|  | 117 | del "e:\tmp\dll.ea" | 
|---|
|  | 118 |  | 
|---|
|  | 119 | $(TMP)/portbras.res:     $(SRC)/portbras/portbras.rc \ | 
|---|
|  | 120 | $(SRC)/id.h \ | 
|---|
|  | 121 | $(SRC)/common.rc \ | 
|---|
|  | 122 | $(SRC)/version.h | 
|---|
|  | 123 | rc -i $I -i $(SRC) -cc 55 -cp 850 -r $(SRC)/portbras/portbras.rc $@ | 
|---|
|  | 124 |  | 
|---|
|  | 125 | $(OUT)/portbras.hlp:     $(SRC)/portbras/portbras.ipf $(SRC)/common.ipf \ | 
|---|
|  | 126 | $(DATA)/teamlogo.bmp $(DATA)/rosaleen.bmp \ | 
|---|
|  | 127 | $(DATA)/gotcha.bmp | 
|---|
|  | 128 | ipfc /D:055 /C:850 $(SRC)/portbras/portbras.ipf $@ | 
|---|
|  | 129 |  | 
|---|
|  | 130 | # ------------------------------------------------------------------------- | 
|---|
|  | 131 |  | 
|---|
|  | 132 | $(OUT)\deutsch.dll:     $(TMP)/deutsch.res \ | 
|---|
|  | 133 | $(SRC)/deutsch/deutsch.def \ | 
|---|
|  | 134 | $(SRC)/dll.obj | 
|---|
|  | 135 | link386 /nologo $(SRC)\dll, $@ /align:16, nul,, $(SRC)\deutsch\deutsch.def | 
|---|
|  | 136 | rc $(TMP)/deutsch.res $@ | 
|---|
|  | 137 | eautil $@ e:\tmp\dll.ea /s | 
|---|
|  | 138 | del "e:\tmp\dll.ea" | 
|---|
|  | 139 |  | 
|---|
|  | 140 | $(TMP)/deutsch.res:     $(SRC)/deutsch/deutsch.rc \ | 
|---|
|  | 141 | $(SRC)/id.h \ | 
|---|
|  | 142 | $(SRC)/common.rc \ | 
|---|
|  | 143 | $(SRC)/version.h | 
|---|
|  | 144 | rc -i $I -i $(SRC) -cc 49 -cp 850 -r $(SRC)/deutsch/deutsch.rc $@ | 
|---|
|  | 145 |  | 
|---|
|  | 146 | # ------------------------------------------------------------------------- | 
|---|
|  | 147 |  | 
|---|
|  | 148 | $(OUT)\czech.dll:     $(TMP)/czech.res \ | 
|---|
|  | 149 | $(SRC)/czech/czech.def \ | 
|---|
|  | 150 | $(SRC)/dll.obj | 
|---|
|  | 151 | link386 /nologo $(SRC)\dll, $@ /align:16, nul,, $(SRC)\czech\czech.def | 
|---|
|  | 152 | rc $(TMP)/czech.res $@ | 
|---|
|  | 153 | eautil $@ e:\tmp\dll.ea /s | 
|---|
|  | 154 | del "e:\tmp\dll.ea" | 
|---|
|  | 155 |  | 
|---|
|  | 156 | $(TMP)/czech.res:     $(SRC)/czech/czech.rc \ | 
|---|
|  | 157 | $(SRC)/id.h \ | 
|---|
|  | 158 | $(SRC)/common.rc \ | 
|---|
|  | 159 | $(SRC)/version.h | 
|---|
|  | 160 | rc -i $I -i $(SRC) -cc 421 -cp 852 -r $(SRC)/czech/czech.rc $@ | 
|---|
|  | 161 |  | 
|---|
|  | 162 | # ------------------------------------------------------------------------- | 
|---|
|  | 163 |  | 
|---|
|  | 164 | # where the various files are (to be) kept; no trailing slashes please! | 
|---|
|  | 165 | #SRC    = | 
|---|
|  | 166 | #TMP    = | 
|---|
|  | 167 | #OUT    = | 
|---|
|  | 168 | #DATA   = $(SRC)/data | 
|---|
|  | 169 |  | 
|---|
|  | 170 | $(OUT)\italiano.dll:     $(TMP)/italiano.res \ | 
|---|
|  | 171 | $(SRC)/italiano/italiano.def \ | 
|---|
|  | 172 | $(SRC)/dll.obj | 
|---|
|  | 173 | link386 /nologo $(SRC)\dll, $@ /align:16, nul,, $(SRC)\italiano\italiano.def | 
|---|
|  | 174 | rc $(TMP)/italiano.res $@ | 
|---|
|  | 175 | eautil $@ e:\tmp\dll.ea /s | 
|---|
|  | 176 | del "e:\tmp\dll.ea" | 
|---|
|  | 177 |  | 
|---|
|  | 178 | $(TMP)/italiano.res:     $(SRC)/italiano/italiano.rc \ | 
|---|
|  | 179 | $(SRC)/id.h \ | 
|---|
|  | 180 | $(SRC)/common.rc \ | 
|---|
|  | 181 | $(SRC)/version.h | 
|---|
|  | 182 | rc -i $I -i $(SRC) -r $(SRC)/italiano/italiano.rc $@ | 
|---|
|  | 183 |  | 
|---|
|  | 184 | $(OUT)/italiano.hlp:     $(SRC)/italiano/italiano.ipf $(SRC)/common.ipf \ | 
|---|
|  | 185 | $(DATA)/teamlogo.bmp $(DATA)/rosaleen.bmp \ | 
|---|
|  | 186 | $(DATA)/gotcha.bmp | 
|---|
|  | 187 | ipfc /D:001 /C:850 $(SRC)/italiano/italiano.ipf $@ | 
|---|
|  | 188 |  | 
|---|
|  | 189 | # ------------------------------------------------------------------------- | 
|---|