Revision ed608150

View differences:

client/Makefile
1
source=client.c
2
root-rel=../
3
dir-name=client
4

  
5
include ../Rules
client/client.c
1
/*
2
 *	BIRD Client
3
 *
4
 *	(c) 1999 Martin Mares <mj@ucw.cz>
5
 *
6
 *	Can be freely distributed and used under the terms of the GNU GPL.
7
 */
8

  
9
#include "nest/bird.h"
10
#include "client/client.h"
11

  
12
int
13
main(int argc, char **argv)
14
{
15
  return client_main(argc, argv);	/* Call sysdep code */
16
}
client/client.h
1
/*
2
 *	BIRD Client
3
 *
4
 *	(c) 1999 Martin Mares <mj@ucw.cz>
5
 *
6
 *	Can be freely distributed and used under the terms of the GNU GPL.
7
 */
8

  
9
/* sysdep code */
10

  
11
int client_main(int argc, char **argv);
sysdep/unix/Modules
18 18
krt-set.c
19 19
krt-set.h
20 20
#endif
21

  
22
client-main.c
sysdep/unix/client-main.c
1
/*
2
 *	BIRD Client -- Unix Entry Point
3
 *
4
 *	(c) 1999 Martin Mares <mj@ucw.cz>
5
 *
6
 *	Can be freely distributed and used under the terms of the GNU GPL.
7
 */
8

  
9
#include <stdio.h>
10
#include <string.h>
11
#include <stdlib.h>
12
#include <unistd.h>
13

  
14
#include "nest/bird.h"
15
#include "client/client.h"
16

  
17
#include "unix.h"
18

  
19
static char *opt_list = "";
20

  
21
static void
22
usage(void)
23
{
24
  fprintf(stderr, "Usage: birdc\n");
25
  exit(1);
26
}
27

  
28
static void
29
parse_args(int argc, char **argv)
30
{
31
  int c;
32

  
33
  while ((c = getopt(argc, argv, opt_list)) >= 0)
34
    switch (c)
35
      {
36
      default:
37
	usage();
38
      }
39
  if (optind < argc)
40
    usage();
41
}
42

  
43
int
44
client_main(int argc, char **argv)
45
{
46
#ifdef HAVE_LIBDMALLOC
47
  if (!getenv("DMALLOC_OPTIONS"))
48
    dmalloc_debug(0x2f03d00);
49
#endif
50

  
51
  parse_args(argc, argv);
52

  
53
  bug("Not implemented yet!");
54
}
tools/Makefile.in
7 7

  
8 8
.PHONY: all subdir depend clean distclean tags
9 9

  
10
all: .dep-stamp subdir $(exedir)/bird
10
all: .dep-stamp subdir $(exedir)/bird $(exedir)/birdc
11 11

  
12 12
subdir depend: .dir-stamp
13 13
	set -e ; for a in $(dynamic-dirs) ; do $(MAKE) -C $$a $@ ; done
14
	set -e ; for a in $(static-dirs) ; do $(MAKE) -C $$a -f $(srcdir_abs)/$$a/Makefile $@ ; done
14
	set -e ; for a in $(static-dirs) $(client-dirs) ; do $(MAKE) -C $$a -f $(srcdir_abs)/$$a/Makefile $@ ; done
15 15

  
16 16
$(exedir)/bird: $(addsuffix /all.o, $(static-dirs)) conf/all.o lib/birdlib.a
17 17
	$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
18 18

  
19
$(exedir)/birdc: client/all.o lib/birdlib.a
20
	$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
21

  
19 22
.dir-stamp:
20
	mkdir -p $(static-dirs)
23
	mkdir -p $(static-dirs) $(client-dirs)
21 24
	touch .dir-stamp
22 25

  
23 26
.dep-stamp:
......
25 28
	touch .dep-stamp
26 29

  
27 30
tags:
28
	cd $(srcdir) ; etags -lc `find $(static-dirs) $(addprefix $(objdir)/,$(dynamic-dirs)) -name *.[chY]`
31
	cd $(srcdir) ; etags -lc `find $(static-dirs) $(addprefix $(objdir)/,$(dynamic-dirs)) $(client-dirs) -name *.[chY]`
29 32

  
30 33
clean:
31 34
	find . -name "*.[oa]" -or -name core -or -name depend | xargs rm -f
32
	rm -f $(exedir)/bird .dep-stamp
35
	rm -f $(exedir)/bird $(exedir)/birdc .dep-stamp
33 36

  
34 37
distclean: clean
35 38
	rm -f config.* configure sysdep/autoconf.h Makefile Rules
tools/Rules.in
10 10
static-dir-paths := $(addprefix $(srcdir)/,$(static-dirs))
11 11
dynamic-dirs := lib conf
12 12
dynamic-dir-paths := $(dynamic-dirs)
13
dir-makefiles := $(addsuffix /Makefile,$(static-dir-paths) $(dynamic-dir-paths))
13
client-dirs := client
14
client-dir-paths := $(client-dirs)
14 15

  
15
all-dirs:=$(static-dirs) $(dynamic-dirs)
16
all-dirs:=$(static-dirs) $(dynamic-dirs) $(client-dirs)
16 17
clean-dirs:=$(all-dirs) proto sysdep
17
dir-objs:=$(addprefix $(objdir)/,$(all-dirs))
18 18

  
19 19
CPPFLAGS=-I$(root-rel) -I$(srcdir) @CPPFLAGS@
20 20
CFLAGS=$(CPPFLAGS) @CFLAGS@

Also available in: Unified diff