aboutsummaryrefslogtreecommitdiffstats
path: root/libbridge/Makefile.in
blob: 505994a63d60bfe7a91ca242c16ca38ec8a1e2b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55

KERNEL_HEADERS=-I@KERNEL_HEADERS@

AR=ar
RANLIB=@RANLIB@

CC=@CC@
CFLAGS = -Wall -g $(KERNEL_HEADERS)

prefix=@prefix@
exec_prefix=@exec_prefix@
includedir=@includedir@
libdir=@libdir@

ifndef HAVE_IF_INDEX
COMPAT_SOURCES=  \
	libbridge_compat.c 
else
COMPAT_SOURCES=  
endif

libbridge_SOURCES= \
	$(COMPAT_SOURCES) \
	libbridge_devif.c \
	libbridge_if.c \
	libbridge_init.c \
	libbridge_misc.c 

libbridge_OBJECTS=$(libbridge_SOURCES:.c=.o)

all:	libbridge.a

install: libbridge.a
	mkdir -p $(DESTDIR)$(includedir)
	install -m 644 libbridge.h $(DESTDIR)$(includedir)
	mkdir -p $(DESTDIR)$(libdir)
	install -m 644 libbridge.a $(DESTDIR)$(libdir)


clean:
	rcsclean *
	rm -f *~
	rm -f *.o
	rm -f libbridge.a

libbridge.a:	$(libbridge_OBJECTS)
	$(AR) rcs $@ $(libbridge_OBJECTS)
	$(RANLIB) $@

%.o: %.c libbridge.h libbridge_private.h
	$(CC) $(CFLAGS) $(INCLUDE) -c $<

libbridge_compat.o:	libbridge_compat.c if_index.c
	$(CC) $(CFLAGS) -c libbridge_compat.c