forked from OoliteProject/oolite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GNUmakefile.postamble
73 lines (65 loc) · 2.53 KB
/
GNUmakefile.postamble
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Oolite-linux
# GNUmakefile.postamble: Runs after-compilation scripts.
# These copy all the base data files into where oolite expects them
# to live (Contents/Resources)
#
CP_FLAGS = -rf
ifeq ($(debug),yes)
EXT =.dbg
endif
ifeq ($(findstring -gnu,$(GNUSTEP_HOST_OS)),-gnu)
CP_FLAGS += -u
endif
ifeq ($(GNUSTEP_HOST_OS),mingw32)
OS_EXT = .exe
CP_FLAGS += -u
endif
SRC_BIN = $(OBJC_PROGRAM_NAME)$(OS_EXT)
DEST_BIN = $(OBJC_PROGRAM_NAME)$(EXT)$(OS_EXT)
MKMANIFEST=tools/mkmanifest.sh
PROGDIR=$(OBJC_PROGRAM_NAME).app
after-all::
$(MKDIRS) $(PROGDIR)
$(MKDIRS) $(PROGDIR)/Resources
$(MKMANIFEST) > $(PROGDIR)/Resources/manifest.plist
$(CP) $(CP_FLAGS) Resources/README.TXT $(PROGDIR)/Resources
$(CP) $(CP_FLAGS) Resources/InfoPlist.strings $(PROGDIR)/Resources
$(CP) $(CP_FLAGS) Resources/AIs $(PROGDIR)/Resources
$(CP) $(CP_FLAGS) Resources/Config $(PROGDIR)/Resources
$(CP) $(CP_FLAGS) Resources/Scenarios $(PROGDIR)/Resources
$(CP) $(CP_FLAGS) Resources/Scripts $(PROGDIR)/Resources
$(CP) $(CP_FLAGS) Resources/Shaders $(PROGDIR)/Resources
$(CP) $(CP_FLAGS) Resources/Binary/Images $(PROGDIR)/Resources
$(CP) $(CP_FLAGS) Resources/Binary/Models $(PROGDIR)/Resources
$(CP) $(CP_FLAGS) Resources/Binary/Music $(PROGDIR)/Resources
$(CP) $(CP_FLAGS) Resources/Binary/Sounds $(PROGDIR)/Resources
$(CP) $(CP_FLAGS) Resources/Binary/Textures $(PROGDIR)/Resources
$(CP) $(CP_FLAGS) Schemata $(PROGDIR)/Resources
ifeq ($(ESPEAK),yes)
ifeq ($(GNUSTEP_HOST_OS),mingw32)
$(CP) $(CP_FLAGS) deps/Cross-platform-deps/espeak-data $(PROGDIR)/Resources
else
ifeq ($(use_deps),yes)
$(CP) $(CP_FLAGS) deps/Cross-platform-deps/espeak-data $(PROGDIR)/Resources
endif
endif
endif
$(CP) $(CP_FLAGS) src/Cocoa/Info-Oolite.plist $(PROGDIR)/Resources/Info-gnustep.plist
$(CP) $(CP_FLAGS) $(GNUSTEP_OBJ_DIR_NAME)/$(SRC_BIN) $(PROGDIR)/$(DEST_BIN)
ifeq ($(debug),no)
$(STRIP) $(PROGDIR)/$(DEST_BIN)
endif
ifeq ($(GNUSTEP_HOST_OS),mingw32)
ifeq ($(GNUSTEP_HOST_CPU),x86_64)
$(CP) $(CP_FLAGS) deps/Windows-deps/x86_64/DLLs/*.dll $(PROGDIR)
else
$(CP) $(CP_FLAGS) deps/Windows-deps/x86/DLLs/*.dll $(PROGDIR)
endif
ifeq ($(debug),yes)
$(RM) $(PROGDIR)/js32ECMAv5.dll
else
$(RM) $(PROGDIR)/js32ECMAv5dbg.dll
endif
endif
after-clean::
$(RM) -rf $(GNUSTEP_OBJ_DIR_BASENAME) $(addprefix $(GNUSTEP_OBJ_DIR_BASENAME), .spk .dbg .spk.dbg)