source: trunk/Makefile.kmk @ 542

Last change on this file since 542 was 520, checked in by Matthias Waltenberger, 5 years ago

Various build conf changes for GCC 4.9.2 (incl Steven's patch), #266 use shared library for poppler

File size: 3.7 KB
Line 
1## @file
2# Top-Level Makefile
3#
4
5SUB_DEPTH = .
6include $(KBUILD_PATH)/subheader.kmk
7
8#
9# Include sub-makefiles
10#
11include $(PATH_SUB_CURRENT)/libdjvu/Makefile.kmk
12include $(PATH_SUB_CURRENT)/libjpeg/Makefile.kmk
13include $(PATH_SUB_CURRENT)/Lucide/Makefile.kmk
14
15#
16# WarpIn & Zip distribution
17#
18
19PATH_OUT        ?= . # be on the safe side (we do rmdir -fR of PATH_PACKING)
20PATH_PACKING = $(PATH_OUT)/dist/packing
21
22FILE_VERSION = $(subst $(SP),_,$(subst .,_,$(VERSION)$(if $(BUILD),_$(BUILD))))
23
24LUCIDE_WPI       = $(PATH_OUT)/Lucide-$(FILE_VERSION).wpi
25LUCIDE_ZIP       = $(PATH_OUT)/Lucide-$(FILE_VERSION).zip
26
27LUCIDE_WIS       = $(PATH_PACKING)/wpi/lucide.wis
28
29OTHER_CLEAN     += $(LUCIDE_WPI) $(LUCIDE_ZIP) $(LUCIDE_WIS)
30
31ifeq ($(IN_PACKING),)
32
33#
34# Special packing target sets a magic variable and restarts
35# (to avoid extra INSTALLS targets during regular non-packing kmk invocations)
36#
37PACKING          = do_packing
38
39do_packing:
40        $(RM) -fR $(PATH_PACKING)
41        $(QUIET)$(MAKE) IN_PACKING=1 uninstall rebuild packing
42
43fastpacking:
44        $(RM) -fR $(PATH_PACKING)
45        $(QUIET)$(MAKE) IN_PACKING=1 uninstall packing
46
47fastestpacking:
48        $(QUIET)$(MAKE) IN_PACKING=1 packing
49
50else
51
52#
53# Real packing rules
54#
55INSTALLS         = Lucide_wpi_1 Lucide_wpi_2 Lucide_wpi_3 Lucide_wpi_4 Lucide_wpi_5 \
56                   Lucide_wpi_6 Lucide_wpi_7 Lucide_wpi_8 Lucide_wpi_9 Lucide_wpi_10 \
57                   Lucide_zip
58PACKING          = $(LUCIDE_WPI) $(LUCIDE_ZIP)
59
60#
61# WPI
62#
63
64Lucide_wpi_1_INST                = $(notdir $(PATH_PACKING))/wpi/1/
65Lucide_wpi_1_SOURCES     = \
66        $(Lucide_1_TARGET) \
67        $(Lucide_dll_1_TARGET) \
68        $(ludoc_1_TARGET) \
69        $(abspathex $(Lucide_doc_SOURCES),$(Lucide_doc_DEFPATH)) \
70        $(abspathex $(Lucide_lng_SOURCES),$(Lucide_lng_DEFPATH))
71
72Lucide_wpi_2_INST                = $(notdir $(PATH_PACKING))/wpi/2/
73Lucide_wpi_2_SOURCES     = $(lupoppler_1_TARGET)
74
75Lucide_wpi_3_INST                = $(notdir $(PATH_PACKING))/wpi/3/
76Lucide_wpi_3_SOURCES     = $(ludjvu_1_TARGET)
77
78Lucide_wpi_4_INST                = $(notdir $(PATH_PACKING))/wpi/4/
79Lucide_wpi_4_SOURCES     = $(lujpeg_1_TARGET)
80
81Lucide_wpi_5_INST                = $(notdir $(PATH_PACKING))/wpi/5/
82Lucide_wpi_5_SOURCES     = warpin/LngDummy.txt
83
84Lucide_wpi_6_INST                = $(notdir $(PATH_PACKING))/wpi/6/
85Lucide_wpi_6_SOURCES     = warpin/LngDummy.txt
86
87Lucide_wpi_7_INST                = $(notdir $(PATH_PACKING))/wpi/7/
88Lucide_wpi_7_SOURCES     = warpin/LngDummy.txt
89
90Lucide_wpi_8_INST                = $(notdir $(PATH_PACKING))/wpi/8/
91Lucide_wpi_8_SOURCES     = warpin/LngDummy.txt
92
93Lucide_wpi_9_INST                = $(notdir $(PATH_PACKING))/wpi/9/
94Lucide_wpi_9_SOURCES     = warpin/LngDummy.txt
95
96Lucide_wpi_10_INST               = $(notdir $(PATH_PACKING))/wpi/10/
97Lucide_wpi_10_SOURCES    = warpin/LngDummy.txt
98
99
100$(LUCIDE_WPI): $(LUCIDE_WIS) install
101        $(call MSG_L1,Packing $@)
102        -$(QUIET)$(RM) -f $@
103        $(QUIET)echo > $(abspathex $(Lucide_wpi_1_INST),$(PATH_OUT)/dist)/lucide.fcf
104        $(QUIET)wic -a $@ \
105                $(foreach p,$(patsubst Lucide_wpi_%,%,$(filter Lucide_wpi_%,$(INSTALLS))),\
106                        $(p) -c$(abspathex $(Lucide_wpi_$(p)_INST),$(PATH_OUT)/dist) \*) \
107                -s $(LUCIDE_WIS)
108
109$(LUCIDE_WIS): warpin/lucide.wis.tpl Config.kmk | $$(call DIRDEP,$$(@D))
110        $(call MSG_L1,Generating $@)
111        $(QUIET)$(SED) \
112                -e "s;\\\$${VERSION};$(VERSION);g" \
113                -e "s;\\\$${BUILD};$(BUILD);g" \
114                -e "s;\\\$${WPIVERSION};$(subst .,\\\,$(VERSION));g" \
115                -e "s;\\\$${WPIBUILD};$(WPIBUILD);g" \
116                --output $@ $<
117
118BLDDIRS += $(dir $(LUCIDE_WIS))
119
120#
121# ZIP (puts all WPI packages together)
122#
123
124Lucide_zip_INST          = $(notdir $(PATH_PACKING))/zip/
125Lucide_zip_SOURCES       = \
126        $(foreach p,$(patsubst Lucide_wpi_%,%,$(filter Lucide_wpi_%,$(INSTALLS))),\
127                $(Lucide_wpi_$(p)_SOURCES))
128
129$(LUCIDE_ZIP): install
130        $(call MSG_L1,Packing $@)
131        -$(QUIET)$(RM) -f $@
132        $(QUIET)$(REDIRECT) -C $(PATH_PACKING)/zip -- zip -Sr9 $@ \*
133
134endif # IN_PACKING
135
136include $(FILE_KBUILD_SUB_FOOTER)
137
138
Note: See TracBrowser for help on using the repository browser.