summaryrefslogtreecommitdiff
path: root/networking/udhcp/Makefile.in
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2006-03-13 19:04:00 +0000
committerBernhard Reutner-Fischer2006-03-13 19:04:00 +0000
commitdf10094870c28cc0c6c5577c9aa03b8ede9cb8a6 (patch)
tree49493696039b285aa751a5bc884fc70c9c85e878 /networking/udhcp/Makefile.in
parentc5b1d4d6b14f22b5e2f7ae42eb01bf2746b8001c (diff)
downloadbusybox-df10094870c28cc0c6c5577c9aa03b8ede9cb8a6.zip
busybox-df10094870c28cc0c6c5577c9aa03b8ede9cb8a6.tar.gz
- revert back to r14406
Diffstat (limited to 'networking/udhcp/Makefile.in')
-rw-r--r--networking/udhcp/Makefile.in99
1 files changed, 29 insertions, 70 deletions
diff --git a/networking/udhcp/Makefile.in b/networking/udhcp/Makefile.in
index 210939f..df32247 100644
--- a/networking/udhcp/Makefile.in
+++ b/networking/udhcp/Makefile.in
@@ -3,9 +3,13 @@
# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
#
# Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
+#
-srcdir:=$(top_srcdir)/networking/udhcp
-objdir:=$(top_builddir)/networking/udhcp
+UDHCP_AR:=udhcp.a
+ifndef $(UDHCP_DIR)
+UDHCP_DIR:=$(top_builddir)/networking/udhcp/
+endif
+srcdir=$(top_srcdir)/networking/udhcp
#ok, so I forgot how to do an or, but this is a quick and dirty hack
ifeq ($(strip $(CONFIG_UDHCPC)),y)
@@ -18,77 +22,32 @@ CONFIG_UDHCP_SHARED=n
endif
endif
-UDHCP__SHARED_FILES:=common.c options.c packet.c pidfile.c signalpipe.c socket.c
-UDHCP__UDHCPC_FILES:=dhcpc.c clientpacket.c clientsocket.c script.c
-UDHCP__UDHCPD_FILES:=dhcpd.c arpping.c files.c leases.c serverpacket.c \
- static_leases.c
-UDHCP__DUMPLEASES_FILES:=dumpleases.c
-
-UDHCP-$(CONFIG_UDHCP_SHARED) += $(UDHCP__SHARED_FILES)
-UDHCP-$(CONFIG_UDHCPC) += $(UDHCP__UDHCPC_FILES)
-UDHCP-$(CONFIG_UDHCPD) += $(UDHCP__UDHCPD_FILES)
-UDHCP-$(CONFIG_DUMPLEASES) += $(UDHCP__DUMPLEASES_FILES)
+UDHCP-y:=
+UDHCP-$(CONFIG_UDHCP_SHARED) += common.c options.c packet.c pidfile.c \
+ signalpipe.c socket.c
+UDHCP-$(CONFIG_UDHCPC) += dhcpc.c clientpacket.c clientsocket.c \
+ script.c
+UDHCP-$(CONFIG_UDHCPD) += dhcpd.c arpping.c files.c leases.c \
+ serverpacket.c static_leases.c
+UDHCP-$(CONFIG_DUMPLEASES) += dumpleases.c
+UDHCP_OBJS:=$(patsubst %.c,$(UDHCP_DIR)%.o, $(UDHCP-y))
+
+ifneq ($(strip $(UDHCP-y)),)
+libraries-y+=$(UDHCP_DIR)$(UDHCP_AR)
+endif
-UDHCP_SRC-y:=$(patsubst %,$(srcdir)/%,$(UDHCP-y))
-UDHCP_SRC-a:=$(wildcard $(srcdir)/*.c)
-APPLET_SRC-y+=$(UDHCP_SRC-y)
-APPLET_SRC-a+=$(UDHCP_SRC-a)
+UDHCP-y:=$(patsubst %,$(srcdir)/%,$(UDHCP-y))
+UDHCP-a:=$(wildcard $(srcdir)/*.c)
+APPLET_SRC-y+=$(UDHCP-y)
+APPLET_SRC-a+=$(UDHCP-a)
UDHCP_INCLUDES:=$(srcdir)
-#APPLETS_DEFINE-y+= -I$(UDHCP_INCLUDES) -DIN_BUSYBOX
-#APPLETS_DEFINE-a+= -I$(UDHCP_INCLUDES) -DIN_BUSYBOX
-
-CFLAGS-udhcp:= -I$(UDHCP_INCLUDES)
-
-# bug in make-3.80 prevents this:
-#define udhcp__flags
-#CFLAGS-udhcp-$(1):=-DIN_BUSYBOX
-#endef
-#
-#ifeq ($(CONFIG_UDHCP_SHARED),y)
-#$(foreach f,$(UDHCP__SHARED_FILES),$(eval $(call udhcp__flags,$(f))))
-#endif
-#ifeq ($(CONFIG_UDHCPC),y)
-#$(foreach f,$(UDHCP__UDHCPC_FILES),$(eval $(call udhcp__flags,$(f))))
-#endif
-#ifeq ($(CONFIG_UDHCPD),y)
-#$(foreach f,$(UDHCP__UDHCPD_FILES),$(eval $(call udhcp__flags,$(f))))
-#endif
-#ifeq ($(CONFIG_DUMPLEASES),y)
-#$(foreach f,$(UDHCP__DUMPLEASES_FILES),$(eval $(call udhcp__flags,$(f))))
-#endif
-
-ifeq ($(CONFIG_UDHCP_SHARED),y)
-CFLAGS-udhcp-common.c:=-DIN_BUSYBOX
-CFLAGS-udhcp-options.c:=-DIN_BUSYBOX
-CFLAGS-udhcp-packet.c:=-DIN_BUSYBOX
-CFLAGS-udhcp-pidfile.c:=-DIN_BUSYBOX
-CFLAGS-udhcp-signalpipe.c:=-DIN_BUSYBOX
-CFLAGS-udhcp-socket.c:=-DIN_BUSYBOX
-endif
-ifeq ($(CONFIG_UDHCPC),y)
-CFLAGS-udhcp-dhcpc.c:=-DIN_BUSYBOX
-CFLAGS-udhcp-clientpacket.c:=-DIN_BUSYBOX
-CFLAGS-udhcp-clientsocket.c:=-DIN_BUSYBOX
-CFLAGS-udhcp-script.c:=-DIN_BUSYBOX
-endif
-ifeq ($(CONFIG_UDHCPD),y)
-CFLAGS-udhcp-dhcpd.c:=-DIN_BUSYBOX
-CFLAGS-udhcp-arpping.c:=-DIN_BUSYBOX
-CFLAGS-udhcp-files.c:=-DIN_BUSYBOX
-CFLAGS-udhcp-leases.c:=-DIN_BUSYBOX
-CFLAGS-udhcp-serverpacket.c:=-DIN_BUSYBOX
-CFLAGS-udhcp-static_leases.c:=-DIN_BUSYBOX
-endif
-ifeq ($(CONFIG_DUMPLEASES),y)
-CFLAGS-udhcp-dumpleases.c:=-DIN_BUSYBOX
-endif
-
-
-networking_udhcp_OBJ:=$(patsubst %.c,$(objdir)/%.o,$(UDHCP-y))
+APPLETS_DEFINE-y+=-DIN_BUSYBOX -I$(UDHCP_INCLUDES)
+APPLETS_DEFINE-a+=-DIN_BUSYBOX -I$(UDHCP_INCLUDES)
-$(networking_udhcp_OBJ): $(objdir)/%.o: $(srcdir)/%.c
-$(objdir)/udhcp.a: $(networking_udhcp_OBJ)
-libraries-y:=$(libraries-y) $(objdir)/udhcp.a
+$(UDHCP_DIR)$(UDHCP_AR): $(UDHCP_OBJS)
+ $(do_ar)
+$(UDHCP_OBJS): $(UDHCP_DIR)%.o : $(srcdir)/%.c
+ $(compile.c) -DIN_BUSYBOX