0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-17 08:38:42 +00:00
bird/tools/Rules.in
Martin Mares f9254d2349 Autoconf is *evil*. The sysconfdir and similar variables are unusable in
C includes as they contain substitutions specific to make.

Worked around by creating sysconf/paths.h which is created from
the Makefile instead of by the configure script.
2000-05-08 14:19:47 +00:00

83 lines
1.4 KiB
Plaintext

# Makefile fragments for the BIRD Internet Routing Daemon
# (c) 1999--2000 Martin Mares <mj@ucw.cz>
srcdir=@srcdir_rel_mf@
srcdir_abs := $(shell cd $(srcdir) ; pwd)
objdir=@objdir@
exedir=@exedir@
protocols=@protocols@
static-dirs := nest filter $(addprefix proto/,$(protocols))
static-dir-paths := $(addprefix $(srcdir)/,$(static-dirs))
dynamic-dirs := lib conf
dynamic-dir-paths := $(dynamic-dirs)
client-dirs := @CLIENT@
client-dir-paths := $(client-dirs)
doc-dirs := doc
doc-dir-paths := $(doc-dirs)
all-dirs:=$(static-dirs) $(dynamic-dirs) $(client-dirs) $(doc-dirs)
clean-dirs:=$(all-dirs) proto sysdep
CPPFLAGS=-I$(root-rel) -I$(srcdir) @CPPFLAGS@
CFLAGS=$(CPPFLAGS) @CFLAGS@
LDFLAGS=
LIBS=@LIBS@
CLIENT_LIBS=@CLIENT_LIBS@
CC=@CC@
M4=@M4@
BISON=@BISON@
FLEX=@FLEX@
RANLIB=@RANLIB@
INSTALL=@INSTALL@
INSTALL_PROGRAM=@INSTALL_PROGRAM@
INSTALL_DATA=@INSTALL_DATA@
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
sbindir=@sbindir@
sysconfdir=@sysconfdir@
localstatedir=@localstatedir@
ifdef source
objs := $(subst .c,.o,$(source))
ifdef dir-name
src-path := $(srcdir)/$(dir-name)/
endif
all:
cd $(root-rel) && make
ifdef lib-dest
subdir: $(lib-dest)
$(lib-dest): $(objs)
rm -f $@
ar rcs $@ $^
$(RANLIB) $@
else
subdir: all.o
all.o: $(objs)
$(LD) -r -o $@ $^
endif
%.o: $(src-path)%.c
$(CC) $(CFLAGS) -o $@ -c $<
depend:
$(CC) $(CPPFLAGS) -MM $(addprefix $(src-path),$(source)) >depend
ifneq ($(wildcard depend),)
include depend
endif
endif