OSDN Git Service

Updated the makefile rules to install the Japanese localization.
[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-dos.c main-ibm.c \
95         makefile.bcc makefile.std makefile.dos makefile.ibm \
96         readdib.c wall.bmp
97
98 cocoa_icon_files = \
99         cocoa/hengband_Icons.icns \
100         cocoa/Save.icns \
101         cocoa/Edit.icns \
102         cocoa/Data.icns
103 cocoa_plist_template = cocoa/Angband-Cocoa.xml
104 cocoa_plist_files = \
105         cocoa/CommandMenu.plist
106 cocoa_en_nib_files = \
107         cocoa/en.lproj/MainMenu.nib/designable.nib \
108         cocoa/en.lproj/MainMenu.nib/keyedobjects.nib
109 cocoa_en_strings_files = \
110         cocoa/en.lproj/CommandMenu.strings \
111         cocoa/en.lproj/GraphicsMenu.strings
112 cocoa_ja_nib_files = \
113         cocoa/ja.lproj/MainMenu.nib/designable.nib \
114         cocoa/ja.lproj/MainMenu.nib/keyedobjects.nib
115 cocoa_ja_strings_files = \
116         cocoa/ja.lproj/CommandMenu.strings \
117         cocoa/ja.lproj/GraphicsMenu.strings
118
119 EXTRA_DIST = \
120         gcc-wrap \
121         $(cocoa_icon_files) \
122         $(cocoa_plist_template) \
123         $(cocoa_plist_files) \
124         $(cocoa_en_nib_files) \
125         $(cocoa_en_strings_files) \
126         $(cocoa_ja_nib_files) \
127         $(cocoa_ja_strings_files)
128
129 if COCOA
130 hengband_SOURCES += main-cocoa.m grafmode.h grafmode.c
131 AM_CFLAGS = -mmacosx-version-min=10.7
132 AM_OBJCFLAGS = -mmacosx-version-min=10.7
133 hengband_LDFLAGS = -framework cocoa $(AM_LDFLAGS)
134 hengband_LINK = MACOSX_DEPLOYMENT_TARGET=10.7 $(OBJCLINK) $(hengband_LDFLAGS) $(LDFLAGS) -o $@ 
135 APPNAME = $(PACKAGE_NAME)
136 APPEXE = hengband
137 APPDIR = $(APPNAME).app
138 BUNDLE_IDENTIFIER = jp.osdn.hengband
139 BUNDLE_VERSION = $(PACKAGE_VERSION)
140 # Be careful with characters (like '&') in the copyright that have special
141 # meanings to sed.
142 COPYRIGHT = (c) Mr. Hoge and many others
143 APPBNDL = $(bindir)/$(APPDIR)
144 APPCONT = $(APPBNDL)/Contents
145 APPBIN = $(APPCONT)/MacOS
146 APPRES = $(APPCONT)/Resources
147 appbin_PROGRAMS = $(APPEXE)
148 appbindir = $(APPBIN)
149 dist_appicon_DATA = $(cocoa_icon_files)
150 appicondir = $(APPRES)
151 appplist_DATA = $(cocoa_plist_files)
152 appplistdir = $(APPRES)
153 appennib_DATA = $(cocoa_en_nib_files)
154 appennibdir = $(APPRES)/en.lproj/MainMenu.nib
155 appen_DATA = $(cocoa_en_strings_files)
156 appendir = $(APPRES)/en.lproj
157 appjanib_DATA = $(cocoa_ja_nib_files)
158 appjanibdir = $(APPRES)/ja.lproj/MainMenu.nib
159 appja_DATA = $(cocoa_ja_strings_files)
160 appjadir = $(APPRES)/ja.lproj
161 else
162 EXTRA_hengband_SOURCES += main-cocoa.m grafmode.h grafmode.c
163 hengband_LINK = $(LINK)
164 endif
165
166 COMPILE = $(srcdir)/gcc-wrap $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
167         $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
168
169 install-exec-hook:
170 if SET_GID
171         chgrp "@GAMEGROUP@" "$(DESTDIR)$(bindir)/hengband"
172         chmod g+s "$(DESTDIR)$(bindir)/hengband"
173 endif
174
175 if COCOA
176 # Create lib/info and lib/xtra within the application bundle since not
177 # currently installing anything to them.  Other relevant lib directories
178 # should be created from the Makefiles in the lib directory.
179 install-data-local:
180         @mkdir -p $(APPCONT)
181         @mkdir -p $(APPRES)/lib/info
182         @mkdir -p $(APPRES)/lib/xtra
183         sed -e 's/\$$VERSION\$$/$(PACKAGE_VERSION)/' \
184                 -e 's/\$$COPYRIGHT\$$/$(COPYRIGHT)/' \
185                 -e 's/\$$NAME\$$/$(APPNAME)/' \
186                 -e 's/\$$EXECUTABLE\$$/$(APPEXE)/' \
187                 -e 's/\$$BUNDLE_VERSION\$$/$(BUNDLE_VERSION)/' \
188                 -e 's/\$$BUNDLE_IDENTIFIER\$$/$(BUNDLE_IDENTIFIER)/' \
189                 $(srcdir)/$(cocoa_plist_template) > $(APPCONT)/Info.plist
190
191 distclean-local:
192         -rm $(APPCONT)/Info.plist
193
194 endif