add tools/cdrtools
[openadk.git] / package / Makefile
blobf6f608a69712c56ad169877ec794fca2e286aeff
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 $(TOPDIR)/rules.mk
8 ifeq (${ADK_TARGET_LIB_GLIBC},y)
9 package-$(ADK_PACKAGE_GLIBC) += glibc
10 gcc-compile: glibc-compile
11 endif
12 ifeq (${ADK_TARGET_LIB_EGLIBC},y)
13 package-$(ADK_PACKAGE_EGLIBC) += eglibc
14 gcc-compile: eglibc-compile
15 endif
16 ifeq (${ADK_TARGET_LIB_MUSL},y)
17 package-$(ADK_PACKAGE_MUSL) += musl
18 gcc-compile: musl-compile
19 endif
20 ifeq (${ADK_NATIVE},y)
21 package-$(ADK_PACKAGE_LIBC) += libc
22 endif
23 ifneq (${ADK_NATIVE},y)
24 package-$(ADK_PACKAGE_LIBPTHREAD) += libpthread
25 endif
27 ifneq (${ADK_TARGET_LIB_GLIBC},y)
28 ifneq (${ADK_TARGET_LIB_EGLIBC},y)
29 ifneq (${ADK_TARGET_LIB_MUSL},y)
30 ifneq (${ADK_NATIVE},y)
31 package-$(ADK_PACKAGE_UCLIBC) += uclibc
32 gcc-compile: uclibc-compile
33 endif
34 package-$(ADK_PACKAGE_UCLIBCXX) += uclibc++
35 endif
36 endif
37 endif
39 include $(TOPDIR)/package/Depends.mk
41 DOWNLOAD:=$(patsubst %,%-download,$(package-y) $(package-m))
42 REBUILD_PACKAGES:=$(patsubst %,%-rebuild,$(package-y) $(package-m))
43 COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y) $(package-m))
44 INSTALL_PACKAGES:=$(patsubst %,%-install,$(package-y))
46 all: compile
47 download: $(DOWNLOAD)
48 clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m) base-files)
49 ifeq ($(ADK_TOOLCHAIN_ONLY),y)
50 compile: $(REBUILD_PACKAGES) $(COMPILE_PACKAGES)
51 install: $(INSTALL_PACKAGES)
52 else
53 compile: $(REBUILD_PACKAGES) base-files-compile $(COMPILE_PACKAGES)
54 install: base-files-install $(INSTALL_PACKAGES)
55 endif
57 %-download:
58 $(START_TRACE) "package/$(patsubst %-download,%,$@)-download: "
59 $(MAKE) -C $(patsubst %-download,%,$@) fetch
60 $(CMD_TRACE) " done"
61 $(END_TRACE)
63 %-host-compile:
64 $(START_TRACE) "package/$(patsubst %-host-compile,%,$@)-host-compile: "
65 $(MAKE) -C $(patsubst %-host-compile,%,$@) hostpackage
66 $(CMD_TRACE) " done"
67 $(END_TRACE)
69 %-compile:
70 $(START_TRACE) "package/$(patsubst %-compile,%,$@)-compile: "
71 $(MAKE) -C $(patsubst %-compile,%,$@) fake build-all-pkgs
72 $(CMD_TRACE) " done"
73 $(END_TRACE)
75 %-rebuild:
76 $(START_TRACE) "package/$(patsubst %-rebuild,%,$@)-rebuild: "
77 $(MAKE) -C $(patsubst %-rebuild,%,$@) rebuild
78 $(CMD_TRACE) " done"
79 $(END_TRACE)
81 %-install:
82 $(START_TRACE) "package/$(patsubst %-install,%,$@)-install: "
83 $(MAKE) -C $(patsubst %-install,%,$@) install
84 $(CMD_TRACE) " done"
85 $(END_TRACE)
87 %-clean:
88 $(START_TRACE) "package/$(patsubst %-clean,%,$@)-clean: "
89 $(MAKE) -C $(patsubst %-clean,%,$@) clean
90 $(CMD_TRACE) " done"
91 $(END_TRACE)