OSDN Git Service

Changed to mark the writeable files directory (~/Documents/Hengband previously) with...
[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.m \
100         cocoa/Base.lproj/MainMenu.xib
101 cocoa_icon_files = \
102         cocoa/hengband_Icons.icns \
103         cocoa/Save.icns \
104         cocoa/Edit.icns \
105         cocoa/Data.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
121
122 EXTRA_DIST = \
123         gcc-wrap \
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)
132
133 if COCOA
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 = -fobjc-arc -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)
140 APPEXE = hengband
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
149 # meanings to sed.
150 COPYRIGHT = Copyright © Mr. Hoge and many others
151 # For now, using the line that appears in news_j.txt.  Is that appropriate?
152 # The ampersand is a kanji so it doesn't seem to be treated as a special
153 # character by sed.
154 COPYRIGHT_JA = Mr.hoge (echizen@users.sourceforge.jp) & 多くの方々
155 APPBNDL = $(bindir)/$(APPDIR)
156 APPCONT = $(APPBNDL)/Contents
157 APPBIN = $(APPCONT)/MacOS
158 APPRES = $(APPCONT)/Resources
159 appbin_PROGRAMS = $(APPEXE)
160 appbindir = $(APPBIN)
161 dist_appicon_DATA = $(cocoa_icon_files)
162 appicondir = $(APPRES)
163 appplist_DATA = $(cocoa_plist_files)
164 appplistdir = $(APPRES)
165 appennib_DATA = $(cocoa_en_nib_files)
166 appennibdir = $(APPRES)/Base.lproj
167 appen_DATA = $(cocoa_en_strings_files)
168 appendir = $(APPRES)/en.lproj
169 appja_DATA = $(cocoa_ja_strings_files)
170 appjadir = $(APPRES)/ja.lproj
171 else
172 EXTRA_hengband_SOURCES += main-cocoa.m grafmode.h grafmode.c \
173         cocoa/AppDelegate.h
174 hengband_LINK = $(LINK)
175 endif
176
177 COMPILE = $(srcdir)/gcc-wrap $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
178         $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
179 OBJCCOMPILE = $(srcdir)/gcc-wrap $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) \
180         $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS)
181
182 install-exec-hook:
183 if SET_GID
184         chgrp "@GAMEGROUP@" "$(DESTDIR)$(bindir)/hengband"
185         chmod g+s "$(DESTDIR)$(bindir)/hengband"
186 endif
187
188 if COCOA
189 # Suppress the warnings from the EUC-JP encoded strings used when building
190 # the Japanese version.
191 AM_CFLAGS += -Wno-invalid-source-encoding
192 AM_OBJCFLAGS += -Wno-invalid-source-encoding
193
194 # Create lib/info within the application bundle since not currently
195 # installing anything to it.  Other relevant lib directories should
196 # be created from the Makefiles in the lib directory.
197 install-data-local:
198         @mkdir -p $(APPCONT)
199         @mkdir -p $(appendir)
200         @mkdir -p $(appjadir)
201         @mkdir -p $(APPRES)/lib/info
202         sed -e 's/\$$VERSION\$$/$(PACKAGE_VERSION)/' \
203                 -e 's/\$$COPYRIGHT\$$/$(COPYRIGHT)/' \
204                 -e 's/\$$NAME\$$/$(APPNAME)/' \
205                 -e 's/\$$EXECUTABLE\$$/$(APPEXE)/' \
206                 -e 's/\$$BUNDLE_VERSION\$$/$(BUNDLE_VERSION)/' \
207                 -e 's/\$$BUNDLE_IDENTIFIER\$$/$(BUNDLE_IDENTIFIER)/' \
208                 -e 's/\$$BUNDLE_DISPLAY_NAME\$$/$(BUNDLE_DISPLAY_NAME)/' \
209                 -e 's/\$$BUNDLE_NAME\$$/$(BUNDLE_NAME)/' \
210                 $(srcdir)/$(cocoa_plist_template) > $(APPCONT)/Info.plist
211         sed -e 's/\$$VERSION\$$/$(PACKAGE_VERSION)/' \
212                 -e 's/\$$COPYRIGHT\$$/$(COPYRIGHT)/' \
213                 -e 's/\$$BUNDLE_DISPLAY_NAME\$$/$(BUNDLE_DISPLAY_NAME)/' \
214                 -e 's/\$$BUNDLE_NAME\$$/$(BUNDLE_NAME)/' \
215                 $(srcdir)/$(cocoa_plist_strings_template) > $(appendir)/InfoPlist.strings
216         sed -e 's/\$$VERSION\$$/$(PACKAGE_VERSION)/' \
217                 -e 's/\$$COPYRIGHT\$$/$(COPYRIGHT_JA)/' \
218                 -e 's/\$$BUNDLE_DISPLAY_NAME\$$/$(BUNDLE_DISPLAY_NAME_JA)/' \
219                 -e 's/\$$BUNDLE_NAME\$$/$(BUNDLE_NAME_JA)/' \
220                 $(srcdir)/$(cocoa_plist_strings_template) > $(appjadir)/InfoPlist.strings
221
222 distclean-local:
223         -rm $(APPCONT)/Info.plist
224         -rm $(appendir)/InfoPlist.strings
225         -rm $(appjadir)/InfoPlist.strings
226
227 endif