mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-17 16:48:43 +00:00
8322ecde12
Restructure client/ subdir. Add two different flavors of client. The full featured birdc client code is in client/birdc/. The new light client birtcl is in client/birdcl/. Common sources of both clients are directly in client/. Rework on-line auto-completion in client/command.c to conditionally turn off ncurses-specific code. Add lightweight client without libreadline and ncurses dependencies - birdcl. The birdcl lacks support of history, on-line auto-completion and there are different implementations of "more" functionality and help on '?' press. New client operates in canonical terminal mode (apart from "more" display) and therefore all commands have to be executed by a return key including help commands (called by '?' character in the end of the line). Apart from these limitations the interaction style should be the same as for the full client - birdc. Build of birdcl is always on (independent on --enable-client parameter).
88 lines
1.7 KiB
Plaintext
88 lines
1.7 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)
|
|
birdc-dirs := client client/@CLIENT@
|
|
birdc-dir-paths := $(birdc-dirs)
|
|
birdcl-dirs := client client/birdcl
|
|
birdcl-dir-paths := $(birdcl-dirs)
|
|
doc-dirs := doc
|
|
doc-dir-paths := $(doc-dirs)
|
|
|
|
all-dirs:=$(static-dirs) $(dynamic-dirs) $(birdc-dirs) $(doc-dirs)
|
|
clean-dirs:=$(all-dirs) proto sysdep
|
|
|
|
CPPFLAGS=-I$(root-rel) -I$(srcdir) @CPPFLAGS@
|
|
CFLAGS=$(CPPFLAGS) @CFLAGS@
|
|
LDFLAGS=@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@
|
|
docdir=@prefix@/doc
|
|
|
|
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 $@ $^
|
|
# Changed to $(CC) because $(LD) has problems with crosscompiling
|
|
$(CC) -nostdlib -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
|