45 lines
815 B
Makefile
Executable File
45 lines
815 B
Makefile
Executable File
|
|
KERNEL_HEADERS=-I@KERNEL_HEADERS@
|
|
|
|
CC=@CC@
|
|
CFLAGS= -Wall @CFLAGS@
|
|
LDFLAGS=@LDFLAGS@
|
|
INCLUDE=-I../libbridge $(KERNEL_HEADERS)
|
|
LIBS= -L ../libbridge -lbridge @LIBS@
|
|
|
|
prefix=@prefix@
|
|
exec_prefix=@exec_prefix@
|
|
bindir=@bindir@
|
|
sbindir=@sbindir@
|
|
mandir=@mandir@
|
|
|
|
INSTALL=@INSTALL@
|
|
|
|
|
|
common_SOURCES= brctl_cmd.c brctl_disp.c
|
|
brctl_SOURCES= brctl.c $(common_SOURCES)
|
|
|
|
common_OBJECTS= $(common_SOURCES:.c=.o)
|
|
brctl_OBJECTS= $(brctl_SOURCES:.c=.o)
|
|
|
|
OBJECTS= $(common_OBJECTS) $(brctl_OBJECTS)
|
|
|
|
PROGRAMS= brctl
|
|
|
|
|
|
all: $(PROGRAMS)
|
|
|
|
install: $(PROGRAMS)
|
|
mkdir -p $(DESTDIR)$(sbindir)
|
|
$(INSTALL) -m 755 $(PROGRAMS) $(DESTDIR)$(sbindir)
|
|
|
|
brctl: $(brctl_OBJECTS) ../libbridge/libbridge.a
|
|
$(CC) $(LDFLAGS) $(brctl_OBJECTS) $(LIBS) -o brctl
|
|
|
|
%.o: %.c brctl.h
|
|
$(CC) $(CFLAGS) $(INCLUDE) -c $<
|
|
|
|
clean:
|
|
rm -f *.o brctl core
|
|
|