OSDN Git Service

Changed configure.ac and the files for automake to handle building and installing...
[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         z-util.c z-virt.c z-form.c z-rand.c z-term.c \
9         variable.c tables.c util.c cave.c \
10         kajitips.h object1.c object2.c monster1.c monster2.c \
11         xtra1.c xtra2.c spells1.c spells2.c \
12         melee1.c melee2.c save.c files.c floors.c\
13         cmd1.c cmd2.c cmd3.c cmd4.c cmd5.c cmd6.c \
14         store.c birth.c load.c \
15         wizard1.c wizard2.c grid.c streams.c rooms.c \
16         generate.c dungeon.c init1.c init2.c \
17         effects.c racial.c inet.c report.c\
18         artifact.c autopick.c mutation.c flavor.c spells3.c \
19         mspells1.c mspells2.c scores.c mind.c mane.c hissatsu.c \
20         bldg.c obj_kind.c wild.c avatar.c japanese.c mspells3.c \
21         main-cap.c main-gcu.c main-x11.c main-xaw.c main.c chuukei.c \
22         angband.h defines.h externs.h generate.h grid.h \
23         h-basic.h h-config.h h-define.h h-system.h h-type.h \
24         mindtips.h readdib.h rooms.h spellstips.h streams.h init.h \
25         types.h z-config.h z-form.h z-rand.h z-term.h z-util.h z-virt.h
26
27 EXTRA_hengband_SOURCES = \
28         angband.ico angband.rc ang_eng.rc maid-x11.c main-mac.c main-win.c \
29         main-dos.c main-ibm.c \
30         makefile.bcc makefile.std makefile.dos makefile.ibm \
31         readdib.c wall.bmp
32
33 cocoa_xcode_files = \
34         cocoa/AppDelegate.m \
35         cocoa/Base.lproj/MainMenu.xib
36 cocoa_icon_files = \
37         cocoa/hengband_Icons.icns \
38         cocoa/Save.icns \
39         cocoa/Edit.icns \
40         cocoa/Data.icns
41 cocoa_plist_template = cocoa/Angband-Cocoa.xml
42 cocoa_plist_strings_template = cocoa/Angband-Cocoa.strings
43 cocoa_plist_files = \
44         cocoa/CommandMenu.plist
45 cocoa_en_nib_files = \
46         cocoa/Base.lproj/MainMenu.nib
47 cocoa_en_strings_files = \
48         cocoa/en.lproj/Localizable.strings \
49         cocoa/en.lproj/CommandMenu.strings \
50         cocoa/en.lproj/GraphicsMenu.strings
51 cocoa_ja_strings_files = \
52         cocoa/ja.lproj/MainMenu.strings \
53         cocoa/ja.lproj/Localizable.strings \
54         cocoa/ja.lproj/CommandMenu.strings \
55         cocoa/ja.lproj/GraphicsMenu.strings
56
57 EXTRA_DIST = \
58         $(cocoa_xcode_files) \
59         $(cocoa_icon_files) \
60         $(cocoa_plist_template) \
61         $(cocoa_plist_strings_template) \
62         $(cocoa_plist_files) \
63         $(cocoa_en_nib_files) \
64         $(cocoa_en_strings_files) \
65         $(cocoa_ja_strings_files)
66
67 if COCOA
68 hengband_SOURCES += main-cocoa.m grafmode.h grafmode.c cocoa/AppDelegate.h
69 AM_CFLAGS = -mmacosx-version-min=10.8 -Wunguarded-availability
70 AM_OBJCFLAGS = -fobjc-arc -mmacosx-version-min=10.8 -Wunguarded-availability
71 hengband_LDFLAGS = -framework cocoa $(AM_LDFLAGS)
72 hengband_LINK = MACOSX_DEPLOYMENT_TARGET=10.8 $(OBJCLINK) $(hengband_LDFLAGS) $(LDFLAGS) -o $@
73 APPNAME = $(PACKAGE_NAME)
74 APPEXE = hengband
75 APPDIR = $(APPNAME).app
76 BUNDLE_IDENTIFIER = jp.osdn.hengband
77 BUNDLE_VERSION = $(PACKAGE_VERSION)
78 BUNDLE_DISPLAY_NAME = $(APPNAME)
79 BUNDLE_NAME = $(BUNDLE_DISPLAY_NAME)
80 BUNDLE_DISPLAY_NAME_JA = 変愚蛮怒
81 BUNDLE_NAME_JA = $(BUNDLE_DISPLAY_NAME_JA)
82 # Be careful with characters (like '&') in the copyright that have special
83 # meanings to sed.
84 COPYRIGHT = Copyright © Mr. Hoge and many others
85 # For now, using the line that appears in news_j.txt.  Is that appropriate?
86 # The ampersand is a kanji so it doesn't seem to be treated as a special
87 # character by sed.
88 COPYRIGHT_JA = Mr.hoge (echizen@users.sourceforge.jp) & 多くの方々
89 APPBNDL = $(bindir)/$(APPDIR)
90 APPCONT = $(APPBNDL)/Contents
91 APPBIN = $(APPCONT)/MacOS
92 APPRES = $(APPCONT)/Resources
93 appbin_PROGRAMS = $(APPEXE)
94 appbindir = $(APPBIN)
95 dist_appicon_DATA = $(cocoa_icon_files)
96 appicondir = $(APPRES)
97 appplist_DATA = $(cocoa_plist_files)
98 appplistdir = $(APPRES)
99 appennib_DATA = $(cocoa_en_nib_files)
100 appennibdir = $(APPRES)/Base.lproj
101 appen_DATA = $(cocoa_en_strings_files)
102 appendir = $(APPRES)/en.lproj
103 appja_DATA = $(cocoa_ja_strings_files)
104 appjadir = $(APPRES)/ja.lproj
105 else
106 EXTRA_hengband_SOURCES += main-cocoa.m grafmode.h grafmode.c \
107         cocoa/AppDelegate.h
108 hengband_LINK = $(LINK)
109 endif
110
111 install-exec-hook:
112 if SET_GID
113         chgrp "@GAMEGROUP@" "$(DESTDIR)$(bindir)/hengband"
114         chmod g+s "$(DESTDIR)$(bindir)/hengband"
115 endif