author | kergoth <kergoth> | 2003-04-22 20:12:04 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2003-04-22 20:12:04 (UTC) |
commit | ccec87cf3e7192c0a3987aa3486668e89b1662a4 (patch) (unidiff) | |
tree | 2d1135ed639410fe1a75486bfdeae8083e1682a2 /Makefile | |
parent | 2134672b0a731415bfd50f2ff22de59b78709e5c (diff) | |
download | opie-ccec87cf3e7192c0a3987aa3486668e89b1662a4.zip opie-ccec87cf3e7192c0a3987aa3486668e89b1662a4.tar.gz opie-ccec87cf3e7192c0a3987aa3486668e89b1662a4.tar.bz2 |
you can now 'make ipks' :)
-rw-r--r-- | Makefile | 26 |
1 files changed, 17 insertions, 9 deletions
@@ -1,125 +1,133 @@ | |||
1 | #!/usr/bin/make -f | 1 | #!/usr/bin/make -f |
2 | ifndef QTDIR | ||
3 | $(error QTDIR not set) | ||
4 | endif | ||
5 | 2 | ||
6 | export OPIEDIR:=$(shell pwd) | 3 | export TOPDIR:=$(shell pwd) |
7 | export TOPDIR:=$(OPIEDIR) | ||
8 | export QMAKE:=$(OPIEDIR)/qmake/qmake | ||
9 | 4 | ||
10 | export QMAKESPECSDIR=$(OPIEDIR)/mkspecs | 5 | include $(TOPDIR)/Vars.make |
11 | 6 | ||
12 | noconfig_targets := xconfig menuconfig config oldconfig randconfig \ | 7 | noconfig_targets := xconfig menuconfig config oldconfig randconfig \ |
13 | defconfig allyesconfig allnoconfig allmodconfig \ | 8 | defconfig allyesconfig allnoconfig allmodconfig \ |
14 | clean-configs | 9 | clean-configs |
15 | 10 | ||
16 | configs += $(TOPDIR)/core/applets/config.in $(TOPDIR)/core/apps/config.in $(TOPDIR)/core/multimedia/config.in $(TOPDIR)/core/pim/config.in $(TOPDIR)/core/pim/today/plugins/config.in $(TOPDIR)/core/settings/config.in $(TOPDIR)/development/config.in $(TOPDIR)/inputmethods/config.in $(TOPDIR)/libopie/ofileselector/config.in $(TOPDIR)/libopie/pim/config.in $(TOPDIR)/libsql/config.in $(TOPDIR)/noncore/applets/config.in $(TOPDIR)/noncore/apps/opie-console/test/config.in $(TOPDIR)/noncore/apps/config.in $(TOPDIR)/noncore/comm/config.in $(TOPDIR)/noncore/decorations/config.in $(TOPDIR)/noncore/games/config.in $(TOPDIR)/noncore/graphics/config.in $(TOPDIR)/noncore/multimedia/config.in $(TOPDIR)/noncore/net/config.in $(TOPDIR)/noncore/net/opietooth/config.in $(TOPDIR)/noncore/settings/config.in $(TOPDIR)/noncore/styles/config.in $(TOPDIR)/noncore/tools/calc2/config.in $(TOPDIR)/noncore/tools/config.in $(TOPDIR)/noncore/todayplugins/config.in | 11 | configs += $(TOPDIR)/core/applets/config.in $(TOPDIR)/core/apps/config.in $(TOPDIR)/core/multimedia/config.in $(TOPDIR)/core/pim/config.in $(TOPDIR)/core/pim/today/plugins/config.in $(TOPDIR)/core/settings/config.in $(TOPDIR)/development/config.in $(TOPDIR)/inputmethods/config.in $(TOPDIR)/libopie/ofileselector/config.in $(TOPDIR)/libopie/pim/config.in $(TOPDIR)/libsql/config.in $(TOPDIR)/noncore/applets/config.in $(TOPDIR)/noncore/apps/opie-console/test/config.in $(TOPDIR)/noncore/apps/config.in $(TOPDIR)/noncore/comm/config.in $(TOPDIR)/noncore/decorations/config.in $(TOPDIR)/noncore/games/config.in $(TOPDIR)/noncore/graphics/config.in $(TOPDIR)/noncore/multimedia/config.in $(TOPDIR)/noncore/net/config.in $(TOPDIR)/noncore/net/opietooth/config.in $(TOPDIR)/noncore/settings/config.in $(TOPDIR)/noncore/styles/config.in $(TOPDIR)/noncore/tools/calc2/config.in $(TOPDIR)/noncore/tools/config.in $(TOPDIR)/noncore/todayplugins/config.in |
17 | 12 | ||
18 | # $(TOPDIR)/.config depends on .depends.cfgs, as it depends on $(configs) | 13 | # $(TOPDIR)/.config depends on .depends.cfgs, as it depends on $(configs) |
19 | # in order to have a full set of config.in files. | 14 | # in order to have a full set of config.in files. |
20 | # .depends depends on $(TOPDIR)/.config | 15 | # .depends depends on $(TOPDIR)/.config |
21 | # everything else depends on .depends, to ensure the dependencies are | 16 | # everything else depends on .depends, to ensure the dependencies are |
22 | # intact. | 17 | # intact. |
23 | # | 18 | # |
24 | # NOTE: The order in which things happen in this makefile is | 19 | # NOTE: The order in which things happen in this makefile is |
25 | # -critical-. Do not rearrange this! | 20 | # -critical-. Do not rearrange this! |
26 | 21 | ||
27 | all : $(TOPDIR)/.config | 22 | all : $(TOPDIR)/.config |
28 | 23 | ||
24 | STRIP=arm-linux-strip | ||
25 | |||
26 | ipks: $(OPIEDIR)/scripts/subst $(OPIEDIR)/scripts/filesubst FORCE | ||
27 | @find $(OPIEDIR)/ -type f -name \*.control | ( for ctrl in `cat`; do \ | ||
28 | prerm=`echo $$ctrl|sed -e 's,\.control$$,.prerm,'`; \ | ||
29 | preinst=`echo $$ctrl|sed -e 's,\.control$$,.preinst,'`; \ | ||
30 | postrm=`echo $$ctrl|sed -e 's,\.control$$,.postrm,'`; \ | ||
31 | postinst=`echo $$ctrl|sed -e 's,\.control$$,.postinst,'`; \ | ||
32 | echo "Building ipk of $$ctrl"; \ | ||
33 | cd $(OPIEDIR); $(OPIEDIR)/scripts/mkipkg --subst=$(OPIEDIR)/scripts/subst --filesubst=$(OPIEDIR)/scripts/filesubst --control=$$ctrl --prerm=$$prerm --preinst=$$preinst --postrm=$$postrm --postinst=$$postinst --strip=$(STRIP) $(OPIEDIR); \ | ||
34 | done ) | ||
35 | |||
29 | $(TOPDIR)/.config : $(TOPDIR)/.depends.cfgs | 36 | $(TOPDIR)/.config : $(TOPDIR)/.depends.cfgs |
30 | 37 | ||
31 | all menuconfig xconfig oldconfig config randconfig allyesconfig allnoconfig defconfig : $(TOPDIR)/.depends.cfgs | 38 | all menuconfig xconfig oldconfig config randconfig allyesconfig allnoconfig defconfig : $(TOPDIR)/.depends.cfgs |
32 | 39 | ||
33 | clean-configs : | 40 | clean-configs : |
34 | @echo "Wiping generated config.in files..." | 41 | @echo "Wiping generated config.in files..." |
35 | @-rm -f $(configs) | 42 | @-rm -f $(configs) |
36 | 43 | ||
37 | -include $(TOPDIR)/.depends.cfgs | 44 | ifneq ($(wildcard $(TOPDIR)/.depends.cfgs),) |
45 | include $(TOPDIR)/.depends.cfgs | ||
46 | endif | ||
38 | 47 | ||
39 | all menuconfig xconfig oldconfig config randconfig allyesconfig allnoconfig defconfig : $(configs) | 48 | all menuconfig xconfig oldconfig config randconfig allyesconfig allnoconfig defconfig : $(configs) |
40 | 49 | ||
41 | $(TOPDIR)/.config: $(TOPDIR)/.depends.cfgs $(configs) | 50 | $(TOPDIR)/.config: $(TOPDIR)/.depends.cfgs $(configs) |
42 | $(call descend,scripts/kconfig,conf) | 51 | $(call descend,scripts/kconfig,conf) |
43 | @if [ ! -e $@ ]; then \ | 52 | @if [ ! -e $@ ]; then \ |
44 | cp $(TOPDIR)/def-configs/opie $@; \ | 53 | cp $(TOPDIR)/def-configs/opie $@; \ |
45 | fi; | 54 | fi; |
46 | @$(MAKE) -C scripts/kconfig conf; | 55 | @$(MAKE) -C scripts/kconfig conf; |
47 | ./scripts/kconfig/conf -s ./config.in | 56 | ./scripts/kconfig/conf -s ./config.in |
48 | 57 | ||
49 | # config rules must have the $(configs) var defined | 58 | # config rules must have the $(configs) var defined |
50 | # at the time that they run. we must ensure that .depends.cfgs | 59 | # at the time that they run. we must ensure that .depends.cfgs |
51 | # is built and included by the time we reach this point. | 60 | # is built and included by the time we reach this point. |
52 | 61 | ||
53 | xconfig : | 62 | xconfig : |
54 | $(call descend,scripts/kconfig,qconf) | 63 | $(call descend,scripts/kconfig,qconf) |
55 | LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(TOPDIR)/scripts/kconfig \ | 64 | LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(TOPDIR)/scripts/kconfig \ |
56 | ./scripts/kconfig/qconf ./config.in | 65 | ./scripts/kconfig/qconf ./config.in |
57 | 66 | ||
58 | menuconfig : scripts/lxdialog/lxdialog | 67 | menuconfig : scripts/lxdialog/lxdialog |
59 | $(call descend,scripts/kconfig,mconf) | 68 | $(call descend,scripts/kconfig,mconf) |
60 | ./scripts/kconfig/mconf ./config.in | 69 | ./scripts/kconfig/mconf ./config.in |
61 | 70 | ||
62 | config : | 71 | config : |
63 | $(call descend,scripts/kconfig,conf) | 72 | $(call descend,scripts/kconfig,conf) |
64 | ./scripts/kconfig/conf ./config.in | 73 | ./scripts/kconfig/conf ./config.in |
65 | 74 | ||
66 | oldconfig : | 75 | oldconfig : |
67 | $(call descend,scripts/kconfig,conf) | 76 | $(call descend,scripts/kconfig,conf) |
68 | ./scripts/kconfig/conf -o ./config.in | 77 | ./scripts/kconfig/conf -o ./config.in |
69 | 78 | ||
70 | randconfig : | 79 | randconfig : |
71 | $(call descend,scripts/kconfig,conf) | 80 | $(call descend,scripts/kconfig,conf) |
72 | ./scripts/kconfig/conf -r ./config.in | 81 | ./scripts/kconfig/conf -r ./config.in |
73 | 82 | ||
74 | allyesconfig : | 83 | allyesconfig : |
75 | $(call descend,scripts/kconfig,conf) | 84 | $(call descend,scripts/kconfig,conf) |
76 | ./scripts/kconfig/conf -y ./config.in | 85 | ./scripts/kconfig/conf -y ./config.in |
77 | 86 | ||
78 | allnoconfig : | 87 | allnoconfig : |
79 | $(call descend,scripts/kconfig,conf) | 88 | $(call descend,scripts/kconfig,conf) |
80 | ./scripts/kconfig/conf -n ./config.in | 89 | ./scripts/kconfig/conf -n ./config.in |
81 | 90 | ||
82 | defconfig : | 91 | defconfig : |
83 | $(call descend,scripts/kconfig,conf) | 92 | $(call descend,scripts/kconfig,conf) |
84 | ./scripts/kconfig/conf -d ./config.in | 93 | ./scripts/kconfig/conf -d ./config.in |
85 | 94 | ||
86 | 95 | ||
87 | export | 96 | export |
88 | 97 | ||
89 | ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) | 98 | ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) |
90 | 99 | ||
91 | export include-config := 1 | 100 | export include-config := 1 |
92 | 101 | ||
93 | -include $(TOPDIR)/.config | 102 | -include $(TOPDIR)/.config |
94 | -include $(TOPDIR)/.depends | 103 | -include $(TOPDIR)/.depends |
95 | |||
96 | endif | 104 | endif |
97 | 105 | ||
98 | -include $(TOPDIR)/.config.cmd | 106 | -include $(TOPDIR)/.config.cmd |
99 | 107 | ||
100 | SUBDIRS = $(subdir-y) | 108 | SUBDIRS = $(subdir-y) |
101 | 109 | ||
102 | export QMAKESPEC=$(QMAKESPECSDIR)/$(patsubst "%",%,$(CONFIG_SPECFILE)) | 110 | export QMAKESPEC=$(QMAKESPECSDIR)/$(patsubst "%",%,$(CONFIG_SPECFILE)) |
103 | 111 | ||
104 | ifdef CONFIG_OPTIMIZATIONS | 112 | ifdef CONFIG_OPTIMIZATIONS |
105 | export CFLAGS_RELEASE=$(patsubst "%,%,$(CONFIG_OPTIMIZATIONS)) | 113 | export CFLAGS_RELEASE=$(patsubst "%,%,$(CONFIG_OPTIMIZATIONS)) |
106 | export CFLAGS_RELEASE:=$(patsubst %",%,$(CFLAGS_RELEASE)) | 114 | export CFLAGS_RELEASE:=$(patsubst %",%,$(CFLAGS_RELEASE)) |
107 | endif | 115 | endif |
108 | 116 | ||
109 | all clean install ipk: $(SUBDIRS) | 117 | all clean install ipk: $(SUBDIRS) |
110 | 118 | ||
111 | lupdate lrelease: | 119 | lupdate lrelease: |
112 | @for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done; | 120 | @for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done; |
113 | 121 | ||
114 | opie-lupdate opie-lrelease: | 122 | opie-lupdate opie-lrelease: |
115 | @for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done; | 123 | @for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done; |
116 | 124 | ||
117 | $(subdir-y) : $(if $(CONFIG_LIBQPE),$(QTDIR)/stamp-headers $(OPIEDIR)/stamp-headers) \ | 125 | $(subdir-y) : $(if $(CONFIG_LIBQPE),$(QTDIR)/stamp-headers $(OPIEDIR)/stamp-headers) \ |
118 | $(if $(CONFIG_LIBQPE-X11),$(QTDIR)/stamp-headers-x11 $(OPIEDIR)/stamp-headers-x11 ) \ | 126 | $(if $(CONFIG_LIBQPE-X11),$(QTDIR)/stamp-headers-x11 $(OPIEDIR)/stamp-headers-x11 ) \ |
119 | $(TOPDIR)/library/custom.h | 127 | $(TOPDIR)/library/custom.h |
120 | 128 | ||
121 | clean : $(TOPDIR)/.config | 129 | clean : $(TOPDIR)/.config |
122 | 130 | ||
123 | apidox : doc/generate_apidox | 131 | apidox : doc/generate_apidox |
124 | 132 | ||
125 | include $(TOPDIR)/Rules.make | 133 | include $(TOPDIR)/Rules.make |