OSDN Git Service

"make utils" now successfully makes utils for target
[uclinux-h8/uClibc.git] / Makefile.in
index 4649181..7f03e96 100644 (file)
@@ -178,14 +178,14 @@ include/bits/sysnum.h: $(top_srcdir)extra/scripts/gen_bits_syscall_h.sh
        fi
 
 $(LOCAL_INSTALL_PATH):
-       $(Q)$(MAKE) PREFIX=$(shell pwd)/ RUNTIME_PREFIX=./ \
-       DEVEL_PREFIX=$(LOCAL_INSTALL_PATH)/usr/ \
+       $(Q)$(MAKE) PREFIX=$(shell pwd)/$(LOCAL_INSTALL_PATH) RUNTIME_PREFIX=/ \
+       DEVEL_PREFIX=/usr/ \
        HOSTCC="$(HOSTCC)" \
        install_kernel_headers
-       $(Q)$(MAKE) PREFIX=$(shell pwd)/ RUNTIME_PREFIX=./ \
-       DEVEL_PREFIX=$(LOCAL_INSTALL_PATH)/usr/ \
+       $(Q)$(MAKE) PREFIX=$(shell pwd)/$(LOCAL_INSTALL_PATH) RUNTIME_PREFIX=/ \
+       DEVEL_PREFIX=/usr/ \
        HOSTCC="$(HOSTCC)" \
-       install_dev
+       install
 
 install: install_runtime install_dev
 
@@ -205,8 +205,8 @@ install_headers: headers $(top_builddir)extra/scripts/unifdef
        $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)include
        top_builddir=$(top_builddir) \
        $(top_srcdir)extra/scripts/install_headers.sh include $(PREFIX)$(DEVEL_PREFIX)include
-       printf '#ifndef _LIBC_INTERNAL_H\n#define _LIBC_INTERNAL_H 1\n#endif\n' > \
-               $(PREFIX)$(DEVEL_PREFIX)include/libc-internal.h
+       # Disabled. If libc-internal.h is needed, document here why!
+       #printf '#ifndef _LIBC_INTERNAL_H\n#define _LIBC_INTERNAL_H 1\n#endif\n' >$(PREFIX)$(DEVEL_PREFIX)include/libc-internal.h
        echo '/* Dont use _syscall#() macros; use the syscall() function */' > \
                $(PREFIX)$(DEVEL_PREFIX)include/bits/syscalls.h
        $(RM) $(PREFIX)$(DEVEL_PREFIX)include/dl-osinfo.h
@@ -214,6 +214,13 @@ install_headers: headers $(top_builddir)extra/scripts/unifdef
        $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/uClibc_uintmaxtostr.h
        $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/kernel_sigaction.h
        $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/kernel_stat.h
+       $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/kernel_types.h
+       $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/utmpx.h
+       $(RM) $(PREFIX)$(DEVEL_PREFIX)include/atomic.h
+       $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/atomic.h
+       $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/sigcontextinfo.h
+       $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/stackinfo.h
+       $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/uClibc_arch_features.h
 ifneq ($(UCLIBC_HAS_FLOATS),y)
        # Remove floating point related headers since float support is disabled.
        $(RM) $(PREFIX)$(DEVEL_PREFIX)include/complex.h
@@ -222,6 +229,7 @@ ifneq ($(UCLIBC_HAS_FLOATS),y)
        $(RM) $(PREFIX)$(DEVEL_PREFIX)include/math.h
        $(RM) $(PREFIX)$(DEVEL_PREFIX)include/tgmath.h
        $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/uClibc_fpmax.h
+       $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/math*.h
 endif
 ifneq ($(UCLIBC_HAS_FENV),y)
        $(RM) $(PREFIX)$(DEVEL_PREFIX)include/fenv.h \
@@ -285,6 +293,7 @@ ifneq ($(UCLIBC_HAS_THREADS),y)
        $(RM) $(PREFIX)$(DEVEL_PREFIX)include/*thread*.h
        $(RM) $(PREFIX)$(DEVEL_PREFIX)include/semaphore.h
        $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/*thread*.h
+       $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/initspin.h
 endif
 ifneq ($(HAVE_SHARED),y)
        # Remove dlfcn header if we don't have shared libraries.
@@ -306,6 +315,8 @@ endif
 ifneq ($(UCLIBC_SUSV3_LEGACY),y)
        # Remove timeb.h since the LEGACY ftime() was disabled upon request
        $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/timeb.h
+       $(RM) $(PREFIX)$(DEVEL_PREFIX)include/ucontext.h
+       $(RM) $(PREFIX)$(DEVEL_PREFIX)include/regexp.h
 endif
 ifneq ($(UCLIBC_HAS_EPOLL),y)
        # Remove epoll.h since epoll_*() were disabled upon request
@@ -329,8 +340,12 @@ ifneq ($(UCLIBC_LINUX_SPECIFIC),y)
        $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/sendfile.h
        $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/fsuid.h
        $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/signalfd.h
+       $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/statfs.h
+       $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/statfs.h
        $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/swap.h
        $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/sysctl.h
+       $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/vfs.h
+       $(RM) ${PREFIX}$(DEVEL_PREFIX)include/sys/sysinfo.h
 endif
 ifneq ($(UCLIBC_SV4_DEPRECATED),y)
        # Remove ustat.h since deprecated SV4 support was disabled upon request
@@ -338,20 +353,13 @@ ifneq ($(UCLIBC_SV4_DEPRECATED),y)
        $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/ustat.h
        $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/ustat.h
 endif
-ifeq ($(UCLIBC_HAS_REALTIME)$(UCLIBC_HAS_ADVANCED_REALTIME),)
-       # Remove SUSv-realtime related message-queue headers upon request
-       $(RM) $(PREFIX)$(DEVEL_PREFIX)include/mqueue.h
-       $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/mqueue.h
-       $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/mqueue.h
-endif
 ifneq ($(UCLIBC_HAS_REALTIME),y)
        # Remove SUSv-realtime related headers upon request
+       $(RM) $(PREFIX)$(DEVEL_PREFIX)include/mqueue.h
+       $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/mqueue.h
        $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sched.h
-       $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/sched.h
        $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/sched.h
        $(RM) $(PREFIX)$(DEVEL_PREFIX)include/semaphore.h
-       $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/semaphore.h
-       $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/semaphore.h
 endif
 ifneq ($(UCLIBC_HAS_SOCKET),y)
        # Remove socket related headers upon request
@@ -367,6 +375,20 @@ ifneq ($(UCLIBC_SUPPORT_AI_ADDRCONFIG),y)
        # Remove ifaddrs.h since the corresponding functionality is disabled
        $(RM) $(PREFIX)$(DEVEL_PREFIX)include/ifaddrs.h
 endif
+ifneq ($(UCLIBC_HAS_SYSLOG),y)
+       # Remove syslog.h since the corresponding functionality is disabled
+       $(RM) $(PREFIX)$(DEVEL_PREFIX)include/syslog.h
+       $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/syslog.h
+       $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/syslog*.h
+endif
+ifneq ($(UCLIBC_HAS_RPC),y)
+       $(RM) -r $(PREFIX)$(DEVEL_PREFIX)include/rpc
+endif
+ifneq ($(UCLIBC_HAS_IPV6),y)
+       # Remove IPv6 headers since the corresponding functionality is disabled
+       $(RM) $(PREFIX)$(DEVEL_PREFIX)include/netinet/ip6.h
+       $(RM) $(PREFIX)$(DEVEL_PREFIX)include/netinet/icmp6.h
+endif
 
 # Installs development library links.
 install_dev: install_headers all
@@ -444,6 +466,9 @@ utils:
 install_utils: utils
        $(MAKE) CROSS="$(CROSS)" CC="$(CC)" -C utils utils_install
 
+install_hostutils: hostutils
+       $(MAKE) CROSS="$(CROSS)" CC="$(CC)" -C utils utils_install DOTHOST=.host
+
 endif # ifeq ($(HAVE_DOT_CONFIG),y)
 
 include/bits include/config: