2002-10-15 03:11:28 +05:30
|
|
|
# Makefile for busybox
|
|
|
|
#
|
2004-03-15 13:59:22 +05:30
|
|
|
# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
|
2002-10-15 03:11:28 +05:30
|
|
|
#
|
2006-01-15 19:34:57 +05:30
|
|
|
# Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
|
2006-03-14 00:34:00 +05:30
|
|
|
#
|
2002-10-15 03:11:28 +05:30
|
|
|
|
2006-03-14 00:34:00 +05:30
|
|
|
UDHCP_AR:=udhcp.a
|
|
|
|
ifndef $(UDHCP_DIR)
|
|
|
|
UDHCP_DIR:=$(top_builddir)/networking/udhcp/
|
|
|
|
endif
|
|
|
|
srcdir=$(top_srcdir)/networking/udhcp
|
2002-10-15 03:11:28 +05:30
|
|
|
|
|
|
|
#ok, so I forgot how to do an or, but this is a quick and dirty hack
|
2006-01-15 19:34:57 +05:30
|
|
|
ifeq ($(strip $(CONFIG_UDHCPC)),y)
|
2002-10-15 03:11:28 +05:30
|
|
|
CONFIG_UDHCP_SHARED=y
|
|
|
|
else
|
2006-01-15 19:34:57 +05:30
|
|
|
ifeq ($(strip $(CONFIG_UDHCPD)),y)
|
2002-10-15 03:11:28 +05:30
|
|
|
CONFIG_UDHCP_SHARED=y
|
|
|
|
else
|
|
|
|
CONFIG_UDHCP_SHARED=n
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2006-03-14 00:34:00 +05:30
|
|
|
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
|
2002-10-15 03:11:28 +05:30
|
|
|
|
2006-03-14 00:34:00 +05:30
|
|
|
UDHCP-y:=$(patsubst %,$(srcdir)/%,$(UDHCP-y))
|
|
|
|
UDHCP-a:=$(wildcard $(srcdir)/*.c)
|
|
|
|
APPLET_SRC-y+=$(UDHCP-y)
|
|
|
|
APPLET_SRC-a+=$(UDHCP-a)
|
2006-01-15 19:34:57 +05:30
|
|
|
|
|
|
|
UDHCP_INCLUDES:=$(srcdir)
|
|
|
|
|
2006-03-14 00:34:00 +05:30
|
|
|
APPLETS_DEFINE-y+=-DIN_BUSYBOX -I$(UDHCP_INCLUDES)
|
|
|
|
APPLETS_DEFINE-a+=-DIN_BUSYBOX -I$(UDHCP_INCLUDES)
|
2002-12-07 03:12:56 +05:30
|
|
|
|
2006-03-14 00:34:00 +05:30
|
|
|
$(UDHCP_DIR)$(UDHCP_AR): $(UDHCP_OBJS)
|
|
|
|
$(do_ar)
|
2006-03-09 14:33:37 +05:30
|
|
|
|
2006-03-14 00:34:00 +05:30
|
|
|
$(UDHCP_OBJS): $(UDHCP_DIR)%.o : $(srcdir)/%.c
|
|
|
|
$(compile.c) -DIN_BUSYBOX
|