OSDN Git Service

Modified src/Makefile.am so that src/cocoa/AppDelegate.{h,m} and src/cocoa/Base.lproj...
[hengbandforosx/hengbandosx.git] / src / Makefile.am
1 ## Makefile.am -- Process this file with automake to process Makefile.in
2
3 AUTOMAKE_OPTIONS = foreign
4
5 bin_PROGRAMS = hengband
6
7 hengband_SOURCES = \
8         artifact.c artifact.h \
9         \
10         angband.h autopick.c \
11         \
12         avatar.h avatar.c \
13         \
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\
21         \
22         defines.h dungeon.c effects.c externs.h files.c flavor.c \
23         \
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 \
27         \
28         feature.c feature.h \
29         geometry.c geometry.h \
30         \
31         gameoption.c gameoption.h gamevalue.h \
32         generate.h grid.c grid.h h-basic.h h-config.h h-define.h \
33         history.h history.c \
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 \
37         \
38         monster.h \
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 \
42         \
43         mutation.h mutation.c \
44         \
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 \
49         \
50         patron.h patron.c \
51         \
52         projection.h projection.c\
53         \
54         player-move.c player-move.h player-damage.c player-damage.h player-status.c player-status.h \
55         \
56         quest.h quest.c\
57         \
58         racial.c \
59         realm-arcane.c \
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 \
69         \
70         rumor.h rumor.c \
71         \
72         spells.h \
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 \
80         \
81         sort.c sort.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 \
85         \
86         view-mainwindow.c\
87         \
88         xtra2.c z-config.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 \
90         z-virt.c z-virt.h 
91
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
97
98 cocoa_xcode_files = \
99         cocoa/AppDelegate.h \
100         cocoa/AppDelegate.m \
101         cocoa/Base.lproj/MainMenu.xib
102 cocoa_icon_files = \
103         cocoa/hengband_Icons.icns \
104         cocoa/Save.icns \
105         cocoa/Edit.icns \
106         cocoa/Data.icns
107 cocoa_plist_template = cocoa/Angband-Cocoa.xml
108 cocoa_plist_strings_template = cocoa/Angband-Cocoa.strings
109 cocoa_plist_files = \
110         cocoa/CommandMenu.plist
111 cocoa_en_nib_files = \
112         cocoa/Base.lproj/MainMenu.nib
113 cocoa_en_strings_files = \
114         cocoa/en.lproj/Localizable.strings \
115         cocoa/en.lproj/CommandMenu.strings \
116         cocoa/en.lproj/GraphicsMenu.strings
117 cocoa_ja_strings_files = \
118         cocoa/ja.lproj/MainMenu.strings \
119         cocoa/ja.lproj/Localizable.strings \
120         cocoa/ja.lproj/CommandMenu.strings \
121         cocoa/ja.lproj/GraphicsMenu.strings
122
123 EXTRA_DIST = \
124         gcc-wrap \
125         $(cocoa_xcode_files) \
126         $(cocoa_icon_files) \
127         $(cocoa_plist_template) \
128         $(cocoa_plist_strings_template) \
129         $(cocoa_plist_files) \
130         $(cocoa_en_nib_files) \
131         $(cocoa_en_strings_files) \
132         $(cocoa_ja_strings_files)
133
134 if COCOA
135 hengband_SOURCES += main-cocoa.m grafmode.h grafmode.c
136 AM_CFLAGS = -mmacosx-version-min=10.8 -Wunguarded-availability
137 AM_OBJCFLAGS = -mmacosx-version-min=10.8 -Wunguarded-availability
138 hengband_LDFLAGS = -framework cocoa $(AM_LDFLAGS)
139 hengband_LINK = MACOSX_DEPLOYMENT_TARGET=10.8 $(OBJCLINK) $(hengband_LDFLAGS) $(LDFLAGS) -o $@
140 APPNAME = $(PACKAGE_NAME)
141 APPEXE = hengband
142 APPDIR = $(APPNAME).app
143 BUNDLE_IDENTIFIER = jp.osdn.hengband
144 BUNDLE_VERSION = $(PACKAGE_VERSION)
145 BUNDLE_DISPLAY_NAME = $(APPNAME)
146 BUNDLE_NAME = $(BUNDLE_DISPLAY_NAME)
147 BUNDLE_DISPLAY_NAME_JA = 変愚蛮怒
148 BUNDLE_NAME_JA = $(BUNDLE_DISPLAY_NAME_JA)
149 # Be careful with characters (like '&') in the copyright that have special
150 # meanings to sed.
151 COPYRIGHT = Copyright © Mr. Hoge and many others
152 # For now, using the English version.  Should be localized to Japanese.
153 COPYRIGHT_JA = $(COPYRIGHT)
154 APPBNDL = $(bindir)/$(APPDIR)
155 APPCONT = $(APPBNDL)/Contents
156 APPBIN = $(APPCONT)/MacOS
157 APPRES = $(APPCONT)/Resources
158 appbin_PROGRAMS = $(APPEXE)
159 appbindir = $(APPBIN)
160 dist_appicon_DATA = $(cocoa_icon_files)
161 appicondir = $(APPRES)
162 appplist_DATA = $(cocoa_plist_files)
163 appplistdir = $(APPRES)
164 appennib_DATA = $(cocoa_en_nib_files)
165 appennibdir = $(APPRES)/Base.lproj
166 appen_DATA = $(cocoa_en_strings_files)
167 appendir = $(APPRES)/en.lproj
168 appja_DATA = $(cocoa_ja_strings_files)
169 appjadir = $(APPRES)/ja.lproj
170 else
171 EXTRA_hengband_SOURCES += main-cocoa.m grafmode.h grafmode.c
172 hengband_LINK = $(LINK)
173 endif
174
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)
179
180 install-exec-hook:
181 if SET_GID
182         chgrp "@GAMEGROUP@" "$(DESTDIR)$(bindir)/hengband"
183         chmod g+s "$(DESTDIR)$(bindir)/hengband"
184 endif
185
186 if COCOA
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
191
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.
195 install-data-local:
196         @mkdir -p $(APPCONT)
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
219
220 distclean-local:
221         -rm $(APPCONT)/Info.plist
222         -rm $(appendir)/InfoPlist.strings
223         -rm $(appjadir)/InfoPlist.strings
224
225 endif