fix rpcbind build, reported by Oliver
[openadk.git] / package / Makefile
blobbfe4a0bd79022eafc35762543f55fbf2ed123af8
1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 # Main makefile for the packages
6 include $(ADK_TOPDIR)/rules.mk
8 ifeq (${ADK_TARGET_LIB_GLIBC},y)
9 package-$(ADK_PACKAGE_GLIBC) += glibc
10 gcc-compile: glibc-compile
11 endif
13 ifeq (${ADK_TARGET_LIB_MUSL},y)
14 package-$(ADK_PACKAGE_MUSL) += musl
15 gcc-compile: musl-compile
16 endif
18 ifeq (${ADK_TARGET_LIB_UCLIBC},y)
19 package-$(ADK_PACKAGE_UCLIBC) += uclibc
20 package-$(ADK_PACKAGE_UCLIBCXX) += uclibc++
21 gcc-compile: uclibc-compile
22 endif
24 ifeq (${ADK_TARGET_LIB_UCLIBC_NG},y)
25 package-$(ADK_PACKAGE_UCLIBC_NG) += uclibc-ng
26 package-$(ADK_PACKAGE_UCLIBCXX) += uclibc++
27 gcc-compile: uclibc-ng-compile
28 endif
30 package-$(ADK_PACKAGE_LIBPTHREAD) += libpthread
32 include $(ADK_TOPDIR)/package/Depends.mk
34 COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y))
35 HOST_COMPILE_PACKAGES:=$(patsubst %,%-host-compile,$(hostpackage-y))
36 INSTALL_PACKAGES:=$(patsubst %,%-install,$(package-y))
38 all: compile
39 download: $(patsubst %,%-download,$(package-y))
40 clean: $(patsubst %,%-clean,$(package-) $(package-y) base-files)
41 hostcompile: $(HOST_COMPILE_PACKAGES)
42 ifeq ($(ADK_TOOLCHAIN_ONLY),y)
43 compile: $(COMPILE_PACKAGES)
44 install: $(INSTALL_PACKAGES)
45 else
46 compile: base-files-compile $(COMPILE_PACKAGES)
47 install: base-files-install $(INSTALL_PACKAGES)
48 endif
50 %-download:
51 $(START_TRACE) "package/$(patsubst %-download,%,$@)-download: "
52 $(MAKE) -C $(patsubst %-download,%,$@) fetch
53 $(CMD_TRACE) " done"
54 $(END_TRACE)
56 %-host-compile:
57 $(START_TRACE) "package/$(patsubst %-host-compile,%,$@)-host-compile: "
58 $(MAKE) -C $(patsubst %-host-compile,%,$@) hostpackage
59 $(CMD_TRACE) " done"
60 $(END_TRACE)
62 %-compile:
63 $(START_TRACE) "package/$(patsubst %-compile,%,$@)-compile: "
64 @if test -f $(ADK_TOPDIR)/.rebuild.$(patsubst %-compile,%,$@); then \
65 $(MAKE) -C $(patsubst %-compile,%,$@) clean ; \
66 rm $(ADK_TOPDIR)/.rebuild.$(patsubst %-compile,%,$@) ; \
68 $(MAKE) -C $(patsubst %-compile,%,$@) fake build-all-pkgs
69 $(CMD_TRACE) " done"
70 $(END_TRACE)
72 %-install:
73 $(START_TRACE) "package/$(patsubst %-install,%,$@)-install: "
74 $(MAKE) -C $(patsubst %-install,%,$@) install
75 $(CMD_TRACE) " done"
76 $(END_TRACE)
78 %-clean:
79 $(START_TRACE) "package/$(patsubst %-clean,%,$@)-clean: "
80 $(MAKE) -C $(patsubst %-clean,%,$@) clean
81 $(CMD_TRACE) " done"
82 $(END_TRACE)