blob: f83e031e2254cfc8cecf764dc5d06cd431c9291d (
plain)
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
|
ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
-include ../../Makefile.include
ifeq ($(NATIVEPREFIX),)
PREFIX = $(ROOT_DIR)
else
PREFIX = $(NATIVEPREFIX)
endif
ifeq ($(NATIVEPLATFORM),)
PLATFORM = native
EXTRA_CONFIGURE = --enable-static
else
PLATFORM = $(NATIVEPLATFORM)
endif
ifeq ($(NATIVE_OS), linux)
EXTRA_CONFIGURE = --enable-static
endif
ifeq ($(NATIVE_OS), android)
EXTRA_CONFIGURE = --enable-static
endif
ifeq ($(CORE_SOURCE_DIR),)
CORE_SOURCE_DIR = $(ROOT_DIR)/../../../..
endif
SOURCE=$(ROOT_DIR)/src
APP=$(PLATFORM)/TexturePacker
APPBIN=$(PREFIX)/bin/TexturePacker
all: .installed-$(PLATFORM)
$(PLATFORM):
-rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
cd $(PLATFORM); cp -a $(SOURCE)/* .
cd $(PLATFORM); ./autogen.sh
cd $(PLATFORM); ./configure --prefix=$(PREFIX) $(EXTRA_CONFIGURE) EXTRA_DEFINES="$(NATIVE_ARCH_DEFINES)"
$(APP): $(PLATFORM)
$(MAKE) -C $(PLATFORM)
.installed-$(PLATFORM): $(APP)
$(MAKE) -C $(PLATFORM) install
touch $@
#TEMP workaround for skins: create legacy link. Remove me when skins are fixed
@mkdir -p $(CORE_SOURCE_DIR)/tools/TexturePacker
@[ -f $(CORE_SOURCE_DIR)/tools/TexturePacker/TexturePacker ] && rm $(CORE_SOURCE_DIR)/tools/TexturePacker/TexturePacker || :
@ln -sf $(APPBIN) $(CORE_SOURCE_DIR)/tools/TexturePacker/TexturePacker
@echo "all:" > $(CORE_SOURCE_DIR)/tools/TexturePacker/Makefile
@echo "\t@echo "WARNING: use of tools/TexturePacker/TexturePacker is deprecated, please update your skins Makefile"" >> $(CORE_SOURCE_DIR)/tools/TexturePacker/Makefile
clean:
$(MAKE) -C $(PLATFORM) clean
distclean::
rm -rf $(PLATFORM) .installed-$(PLATFORM)
-rm -rf bin
|