-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
executable file
·100 lines (78 loc) · 2 KB
/
Makefile
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
MAKEDIR=makedir
COPY=copy
RM=delete
RENAME=rename
VERSION=6.11
ifeq ($(PLATFORM),)
PLATFORM=$(shell uname)
endif
ifeq ($(PLATFORM),AmigaOS)
ifeq ($(shell uname -m),ppc)
PLATFORM=AmigaOS4
else
PLATFORM=AmigaOS3
endif
endif
$(info Building for $(PLATFORM))
ifeq ($(PLATFORM),AmigaOS3)
BINNAME=unrar_aos
AMIGA=1
endif
ifeq ($(PLATFORM),AmigaOS4)
BINNAME=unrar_aos4
AMIGA=1
endif
ifeq ($(PLATFORM),AROS)
BINNAME=unrar_aros
AMIGA=1
endif
ifeq ($(PLATFORM),MorphOS)
BINNAME=unrar_mos
AMIGA=1
endif
ifeq ($(PLATFORM),WarpOS)
BINNAME=unrar_wos
AMIGA=1
endif
ifeq ($(PLATFORM),Mini)
BINNAME=unrar_aos_mini
AMIGA=1
endif
ifeq ($(AMIGA),)
$(error Amiga platform not detected - use "PLATFORM=" parameter to pass one of: MorphOS, AmigaOS4, AROS, AmigaOS3, WarpOS, Mini)
endif
TOPTARGETS := all clean
ifeq ($(PLATFORM),Mini)
SUBDIRS := wstdio locale unrarsrc
else
SUBDIRS := utf8proc wstdio locale unrarsrc
endif
all: $(TOPTARGETS)
cp unrarsrc/unrar $(BINNAME)
$(TOPTARGETS): $(SUBDIRS)
$(SUBDIRS):
$(MAKE) -C $@ $(MAKECMDGOALS)
dist: cat
-@$(MAKEDIR) dist
-@$(RM) dist/unrar_$(VERSION) all
-@$(RM) dist/UnRAR-$(VERSION).lha
@$(MAKEDIR) dist/unrar_$(VERSION)
$(COPY) UnRAR.readme dist/unrar_$(VERSION)
$(COPY) unrar_mos dist/unrar_$(VERSION)/unrar_mos
$(COPY) unrar_aos4 dist/unrar_$(VERSION)/unrar_aos4
$(COPY) unrar_aros dist/unrar_$(VERSION)/unrar_aros
$(COPY) unrar_aos dist/unrar_$(VERSION)/unrar_aos
#$(COPY) unrar_wos dist/unrar_$(VERSION)/unrar_wos
$(COPY) unrar_aos_mini dist/unrar_$(VERSION)/unrar_aos_mini
$(COPY) catalogs dist/unrar_$(VERSION)/catalogs all
$(COPY) license.txt dist/unrar_$(VERSION)
$(COPY) license_newlib.txt dist/unrar_$(VERSION)
$(COPY) license_utf8proc.txt dist/unrar_$(VERSION)
$(COPY) license_libiconv.txt dist/unrar_$(VERSION)
$(COPY) license_getpass.txt dist/unrar_$(VERSION)
@cd dist; lha -r a UnRAR-$(VERSION).lha unrar_$(VERSION)
$(RM) dist/unrar_$(VERSION) all
$(COPY) UnRAR.readme dist/UnRAR-$(VERSION).readme
cat:
${MAKE} -C locale cat
.PHONY: $(TOPTARGETS) $(SUBDIRS) dist cat