check for X.h existence
[openadk.git] / package / Makefile
blob9cf448ff86f7d3063eff4820d9f9b3e1d2c9c03c
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_NATIVE},y)
17 package-$(ADK_PACKAGE_LIBC) += libc
18 endif
19 ifneq (${ADK_NATIVE},y)
20 package-$(ADK_PACKAGE_LIBPTHREAD) += libpthread
21 endif
23 ifneq (${ADK_TARGET_LIB_GLIBC},y)
24 ifneq (${ADK_TARGET_LIB_EGLIBC},y)
25 ifneq (${ADK_NATIVE},y)
26 package-$(ADK_PACKAGE_UCLIBC) += uclibc
27 gcc-compile: uclibc-compile
28 endif
29 package-$(ADK_PACKAGE_UCLIBCXX) += uclibc++
30 endif
31 endif
33 include $(TOPDIR)/package/Depends.mk
35 DOWNLOAD:=$(patsubst %,%-download,$(package-y) $(package-m))
36 REBUILD_PACKAGES:=$(patsubst %,%-rebuild,$(package-y) $(package-m))
37 COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y) $(package-m))
38 INSTALL_PACKAGES:=$(patsubst %,%-install,$(package-y))
40 all: compile
41 download: $(DOWNLOAD)
42 clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m) base-files)
43 ifeq ($(ADK_TOOLCHAIN_ONLY),y)
44 compile: $(REBUILD_PACKAGES) $(COMPILE_PACKAGES)
45 install: $(INSTALL_PACKAGES)
46 else
47 compile: $(REBUILD_PACKAGES) base-files-compile $(COMPILE_PACKAGES)
48 install: base-files-install $(INSTALL_PACKAGES)
49 endif
51 %-download:
52 $(START_TRACE) "package/$(patsubst %-download,%,$@)-download: "
53 $(MAKE) -C $(patsubst %-download,%,$@) fetch
54 $(CMD_TRACE) " done"
55 $(END_TRACE)
57 %-compile:
58 $(START_TRACE) "package/$(patsubst %-compile,%,$@)-compile: "
59 $(MAKE) -C $(patsubst %-compile,%,$@) fake build-all-pkgs
60 $(CMD_TRACE) " done"
61 $(END_TRACE)
63 %-rebuild:
64 $(START_TRACE) "package/$(patsubst %-rebuild,%,$@)-rebuild: "
65 $(MAKE) -C $(patsubst %-rebuild,%,$@) rebuild
66 $(CMD_TRACE) " done"
67 $(END_TRACE)
69 %-install:
70 $(START_TRACE) "package/$(patsubst %-install,%,$@)-install: "
71 $(MAKE) -C $(patsubst %-install,%,$@) install
72 $(CMD_TRACE) " done"
73 $(END_TRACE)
75 %-clean:
76 $(START_TRACE) "package/$(patsubst %-clean,%,$@)-clean: "
77 $(MAKE) -C $(patsubst %-clean,%,$@) clean
78 $(CMD_TRACE) " done"
79 $(END_TRACE)