1 ## Makefile.am -- Process this file with automake to process Makefile.in
3 AUTOMAKE_OPTIONS = foreign
5 bin_PROGRAMS = hengband
8 artifact.c artifact.h \
10 angband.h autopick.c \
14 birth.c bldg.c chest.c chest.h chuukei.c \
15 cmd2.c cmd4.c cmd-activate.c cmd-activate.h cmd-eat.c cmd-eat.h \
16 cmd-item.c cmd-item.h cmd-magiceat.c cmd-magiceat.h \
17 cmd-mane.c cmd-mane.h cmd-pet.c cmd-pet.h \
18 cmd-quaff.c cmd-quaff.h cmd-read.c cmd-read.h cmd-spell.c cmd-spell.h \
19 cmd-usestaff.c cmd-usestaff.h cmd-zaprod.c cmd-zaprod.h cmd-zapwand.c \
20 cmd-zapwand.h cmd-smith.c cmd-smith.h cmd-hissatsu.c cmd-hissatsu.h\
22 defines.h dungeon.c effects.c externs.h files.c flavor.c \
24 floor.h floor-events.c floor-events.h floor-generate.c floor-generate.h \
25 floor-save.h floor-save.c \
26 floor-streams.c floor-streams.h \
29 geometry.c geometry.h \
31 gameoption.c gameoption.h gamevalue.h \
32 generate.h grid.c grid.h h-basic.h h-config.h h-define.h \
34 h-system.h h-type.h inet.c init1.c init2.c init.h japanese.c load.c \
35 main.c main-x11.c main-gcu.c \
36 melee.h melee1.c mind.c \
39 monsterrace-hook.c monsterrace-hook.h monster-process.c \
40 monster-status.c monster-status.h monster1.c \
41 monster2.c mspells1.c mspells2.c mspells3.c mspells4.c monster-spell.h \
43 mutation.h mutation.c \
45 object-boost.c object-boost.h \
46 object-curse.c object-curse.h object-broken.c object-broken.h \
47 object-hook.c object-hook.h object1.c object2.c \
48 objectkind-hook.c objectkind-hook.h \
52 projection.h projection.c\
54 player-move.c player-move.h player-damage.c player-damage.h player-status.c player-status.h \
60 realm-arcane.h realm-chaos.c realm-chaos.h realm-craft.c realm-craft.h \
61 realm-crusade.c realm-crusade.h realm-daemon.c realm-daemon.h realm-death.c \
62 realm-death.h realm-hex.c realm-hex.h realm-hissatsu.c realm-hissatsu.h \
63 realm-life.c realm-life.h realm-nature.c realm-nature.h realm-song.c \
64 realm-song.h realm-sorcery.c realm-sorcery.h realm-trump.c realm-trump.h \
65 report.c rooms.c rooms-city.c rooms-city.h rooms-fractal.c rooms-fractal.h \
66 rooms.h rooms-normal.c rooms-normal.h rooms-pitnest.c rooms-pitnest.h \
67 rooms-special.c rooms-special.h rooms-trap.c rooms-trap.h rooms-vault.c \
68 rooms-vault.h save.c scores.c selfinfo.c selfinfo.h shoot.c shoot.h snipe.c \
73 spells1.c spells2.c spells3.c \
74 spells-diceroll.c spells-diceroll.h \
75 spells-floor.c spells-floor.h \
76 spells-object.c spells-object.h \
77 spells-status.c spells-status.h \
78 spells-summon.c spells-summon.h \
79 spells-world.c spells-world.h \
82 store.h store.c tables.c term.c term.h trap.c trap.h types.h util.c \
83 variable.c wild.h wild.c wizard1.c wizard2.c \
84 warning.c warning.h world.c world.h \
89 z-form.c z-form.h z-rand.c z-rand.h z-term.c z-term.h z-util.c z-util.h \
92 EXTRA_hengband_SOURCES = \
93 angband.ico angband.rc ang_eng.rc maid-x11.c main-mac.c main-win.c \
94 main-cap.c main-dos.c main-ibm.c main-xaw.c \
95 makefile.bcc makefile.std makefile.dos makefile.ibm \
96 readdib.c readdib.h wall.bmp
100 cocoa/Base.lproj/MainMenu.xib
102 cocoa/hengband_Icons.icns \
106 cocoa_plist_template = cocoa/Angband-Cocoa.xml
107 cocoa_plist_strings_template = cocoa/Angband-Cocoa.strings
108 cocoa_plist_files = \
109 cocoa/CommandMenu.plist
110 cocoa_en_nib_files = \
111 cocoa/Base.lproj/MainMenu.nib
112 cocoa_en_strings_files = \
113 cocoa/en.lproj/Localizable.strings \
114 cocoa/en.lproj/CommandMenu.strings \
115 cocoa/en.lproj/GraphicsMenu.strings
116 cocoa_ja_strings_files = \
117 cocoa/ja.lproj/MainMenu.strings \
118 cocoa/ja.lproj/Localizable.strings \
119 cocoa/ja.lproj/CommandMenu.strings \
120 cocoa/ja.lproj/GraphicsMenu.strings
124 $(cocoa_xcode_files) \
125 $(cocoa_icon_files) \
126 $(cocoa_plist_template) \
127 $(cocoa_plist_strings_template) \
128 $(cocoa_plist_files) \
129 $(cocoa_en_nib_files) \
130 $(cocoa_en_strings_files) \
131 $(cocoa_ja_strings_files)
134 hengband_SOURCES += main-cocoa.m grafmode.h grafmode.c cocoa/AppDelegate.h
135 AM_CFLAGS = -mmacosx-version-min=10.8 -Wunguarded-availability
136 AM_OBJCFLAGS = -mmacosx-version-min=10.8 -Wunguarded-availability
137 hengband_LDFLAGS = -framework cocoa $(AM_LDFLAGS)
138 hengband_LINK = MACOSX_DEPLOYMENT_TARGET=10.8 $(OBJCLINK) $(hengband_LDFLAGS) $(LDFLAGS) -o $@
139 APPNAME = $(PACKAGE_NAME)
141 APPDIR = $(APPNAME).app
142 BUNDLE_IDENTIFIER = jp.osdn.hengband
143 BUNDLE_VERSION = $(PACKAGE_VERSION)
144 BUNDLE_DISPLAY_NAME = $(APPNAME)
145 BUNDLE_NAME = $(BUNDLE_DISPLAY_NAME)
146 BUNDLE_DISPLAY_NAME_JA = 変愚蛮怒
147 BUNDLE_NAME_JA = $(BUNDLE_DISPLAY_NAME_JA)
148 # Be careful with characters (like '&') in the copyright that have special
150 COPYRIGHT = Copyright © Mr. Hoge and many others
151 # For now, using the English version. Should be localized to Japanese.
152 COPYRIGHT_JA = $(COPYRIGHT)
153 APPBNDL = $(bindir)/$(APPDIR)
154 APPCONT = $(APPBNDL)/Contents
155 APPBIN = $(APPCONT)/MacOS
156 APPRES = $(APPCONT)/Resources
157 appbin_PROGRAMS = $(APPEXE)
158 appbindir = $(APPBIN)
159 dist_appicon_DATA = $(cocoa_icon_files)
160 appicondir = $(APPRES)
161 appplist_DATA = $(cocoa_plist_files)
162 appplistdir = $(APPRES)
163 appennib_DATA = $(cocoa_en_nib_files)
164 appennibdir = $(APPRES)/Base.lproj
165 appen_DATA = $(cocoa_en_strings_files)
166 appendir = $(APPRES)/en.lproj
167 appja_DATA = $(cocoa_ja_strings_files)
168 appjadir = $(APPRES)/ja.lproj
170 EXTRA_hengband_SOURCES += main-cocoa.m grafmode.h grafmode.c \
172 hengband_LINK = $(LINK)
175 COMPILE = $(srcdir)/gcc-wrap $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
176 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
177 OBJCCOMPILE = $(srcdir)/gcc-wrap $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) \
178 $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS)
182 chgrp "@GAMEGROUP@" "$(DESTDIR)$(bindir)/hengband"
183 chmod g+s "$(DESTDIR)$(bindir)/hengband"
187 # Suppress the warnings from the EUC-JP encoded strings used when building
188 # the Japanese version.
189 AM_CFLAGS += -Wno-invalid-source-encoding
190 AM_OBJCFLAGS += -Wno-invalid-source-encoding
192 # Create lib/info within the application bundle since not currently
193 # installing anything to it. Other relevant lib directories should
194 # be created from the Makefiles in the lib directory.
197 @mkdir -p $(appendir)
198 @mkdir -p $(appjadir)
199 @mkdir -p $(APPRES)/lib/info
200 sed -e 's/\$$VERSION\$$/$(PACKAGE_VERSION)/' \
201 -e 's/\$$COPYRIGHT\$$/$(COPYRIGHT)/' \
202 -e 's/\$$NAME\$$/$(APPNAME)/' \
203 -e 's/\$$EXECUTABLE\$$/$(APPEXE)/' \
204 -e 's/\$$BUNDLE_VERSION\$$/$(BUNDLE_VERSION)/' \
205 -e 's/\$$BUNDLE_IDENTIFIER\$$/$(BUNDLE_IDENTIFIER)/' \
206 -e 's/\$$BUNDLE_DISPLAY_NAME\$$/$(BUNDLE_DISPLAY_NAME)/' \
207 -e 's/\$$BUNDLE_NAME\$$/$(BUNDLE_NAME)/' \
208 $(srcdir)/$(cocoa_plist_template) > $(APPCONT)/Info.plist
209 sed -e 's/\$$VERSION\$$/$(PACKAGE_VERSION)/' \
210 -e 's/\$$COPYRIGHT\$$/$(COPYRIGHT)/' \
211 -e 's/\$$BUNDLE_DISPLAY_NAME\$$/$(BUNDLE_DISPLAY_NAME)/' \
212 -e 's/\$$BUNDLE_NAME\$$/$(BUNDLE_NAME)/' \
213 $(srcdir)/$(cocoa_plist_strings_template) > $(appendir)/InfoPlist.strings
214 sed -e 's/\$$VERSION\$$/$(PACKAGE_VERSION)/' \
215 -e 's/\$$COPYRIGHT\$$/$(COPYRIGHT_JA)/' \
216 -e 's/\$$BUNDLE_DISPLAY_NAME\$$/$(BUNDLE_DISPLAY_NAME_JA)/' \
217 -e 's/\$$BUNDLE_NAME\$$/$(BUNDLE_NAME_JA)/' \
218 $(srcdir)/$(cocoa_plist_strings_template) > $(appjadir)/InfoPlist.strings
221 -rm $(APPCONT)/Info.plist
222 -rm $(appendir)/InfoPlist.strings
223 -rm $(appjadir)/InfoPlist.strings