blob: 2b913f784d37f3cbf14188764f043c68cc4b93ce [file] [log] [blame]
Eric Andersen85208e22002-04-12 12:05:57 +00001# Makefile for busybox
2#
Mike Frysinger0d4ee682005-09-24 06:01:57 +00003# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
Eric Andersen85208e22002-04-12 12:05:57 +00004#
Mike Frysinger0d4ee682005-09-24 06:01:57 +00005# Licensed under the GPL v2, see the file LICENSE in this tarball.
Eric Andersen85208e22002-04-12 12:05:57 +00006
7SYSKLOGD_AR:=sysklogd.a
8ifndef $(SYSKLOGD_DIR)
Eric Andersen7daa0762004-10-08 07:46:08 +00009SYSKLOGD_DIR:=$(top_builddir)/sysklogd/
Eric Andersen85208e22002-04-12 12:05:57 +000010endif
Eric Andersen7daa0762004-10-08 07:46:08 +000011srcdir=$(top_srcdir)/sysklogd
Eric Andersen85208e22002-04-12 12:05:57 +000012
Bernhard Reutner-Fischerbb66a6c2005-10-13 10:24:44 +000013SYSKLOGD-y:=
Eric Andersen85208e22002-04-12 12:05:57 +000014SYSKLOGD-$(CONFIG_KLOGD) += klogd.o
15SYSKLOGD-$(CONFIG_LOGGER) += logger.o
16SYSKLOGD-$(CONFIG_LOGREAD) += logread.o
17SYSKLOGD-$(CONFIG_SYSLOGD) += syslogd.o
18
19libraries-y+=$(SYSKLOGD_DIR)$(SYSKLOGD_AR)
20
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000021SYSKLOGD_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(SYSKLOGD-y))
22SYSKLOGD_SRC-a:=$(wildcard $(srcdir)/*.c)
23APPLET_SRC-y+=$(SYSKLOGD_SRC-y)
24APPLET_SRC-a+=$(SYSKLOGD_SRC-a)
25
Eric Andersen85208e22002-04-12 12:05:57 +000026$(SYSKLOGD_DIR)$(SYSKLOGD_AR): $(patsubst %,$(SYSKLOGD_DIR)%, $(SYSKLOGD-y))
Mike Frysinger4d008962005-07-27 01:09:24 +000027 $(AR) $(ARFLAGS) $@ $(patsubst %,$(SYSKLOGD_DIR)%, $(SYSKLOGD-y))
Eric Andersen85208e22002-04-12 12:05:57 +000028
Eric Andersen7daa0762004-10-08 07:46:08 +000029$(SYSKLOGD_DIR)%.o: $(srcdir)/%.c
30 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
31