File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / bird / tools / Rules.in
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Wed Mar 17 19:50:23 2021 UTC (3 years, 3 months ago) by misho
Branches: bird, MAIN
CVS tags: v1_6_8p3, HEAD
bird 1.6.8

    1: # Makefile fragments for the BIRD Internet Routing Daemon
    2: # (c) 1999--2000 Martin Mares <mj@ucw.cz>
    3: 
    4: srcdir=@srcdir_rel_mf@
    5: srcdir_abs := $(shell cd $(srcdir) ; pwd)
    6: objdir=@objdir@
    7: exedir=@exedir@
    8: 
    9: protocols=@protocols@
   10: static-dirs := nest filter $(addprefix proto/,$(protocols))
   11: static-dir-paths := $(addprefix $(srcdir)/,$(static-dirs))
   12: dynamic-dirs := lib conf
   13: dynamic-dir-paths := $(dynamic-dirs)
   14: client-dirs := client
   15: client-dir-paths := $(client-dirs)
   16: doc-dirs := doc
   17: doc-dir-paths := $(doc-dirs)
   18: 
   19: all-dirs:=$(static-dirs) $(dynamic-dirs) $(client-dirs) $(doc-dirs)
   20: clean-dirs:=$(all-dirs) proto sysdep
   21: 
   22: CPPFLAGS=-I$(root-rel) -I$(srcdir) @CPPFLAGS@
   23: CFLAGS=$(CPPFLAGS) @CFLAGS@
   24: LDFLAGS=@LDFLAGS@
   25: LIBS=@LIBS@
   26: CLIENT_LIBS=@CLIENT_LIBS@
   27: CC=@CC@
   28: M4=@M4@
   29: BISON=@BISON@
   30: FLEX=@FLEX@
   31: RANLIB=@RANLIB@
   32: INSTALL=@INSTALL@
   33: INSTALL_PROGRAM=@INSTALL_PROGRAM@
   34: INSTALL_DATA=@INSTALL_DATA@
   35: 
   36: prefix=@prefix@
   37: exec_prefix=@exec_prefix@
   38: bindir=@bindir@
   39: sbindir=@sbindir@
   40: sysconfdir=@sysconfdir@
   41: localstatedir=@localstatedir@
   42: runstatedir=@runstatedir@
   43: docdir=@prefix@/doc
   44: 
   45: ifdef source
   46: 
   47: objs := $(subst .c,.o,$(source))
   48: 
   49: ifdef dir-name
   50: src-path := $(srcdir)/$(dir-name)/
   51: endif
   52: 
   53: all:
   54: 	cd $(root-rel) && make
   55: 
   56: ifdef lib-dest
   57: 
   58: subdir: $(lib-dest)
   59: 
   60: $(lib-dest): $(objs)
   61: 	rm -f $@
   62: 	ar rcs $@ $^
   63: 	$(RANLIB) $@
   64: 
   65: else
   66: 
   67: subdir: all.o
   68: 
   69: all.o: $(objs)
   70: 	@echo LD -r -o $@ $^
   71: 	$(LD) -r -o $@ $^
   72: 
   73: endif
   74: 
   75: %.o: $(src-path)%.c
   76: 	@echo CC -o $@ -c $<
   77: 	@$(CC) $(CFLAGS) -o $@ -c $<
   78: 
   79: ifndef source-dep
   80: source-dep := $(source)
   81: endif
   82: 
   83: depend:
   84: 	$(CC) $(CPPFLAGS) -MM $(addprefix $(src-path),$(source-dep)) >depend
   85: 
   86: ifneq ($(wildcard depend),)
   87: include depend
   88: endif
   89: 
   90: endif

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>