33 lines
460 B
Makefile
Executable file
33 lines
460 B
Makefile
Executable file
|
|
PRDPATH=/bin
|
|
TARGET=bprdctl
|
|
|
|
OBJS = bpctl.o
|
|
|
|
CFLAGS = -g -Wall
|
|
LDFLAGS= -Wl,-rpath,/usr/local/lib -lbprd
|
|
|
|
ZLIB_SUPP := /usr/include/zlib.h
|
|
ifneq (,$(wildcard $(ZLIB_SUPP)))
|
|
LDFLAGS+= -lz
|
|
endif
|
|
|
|
|
|
PREFIX=
|
|
|
|
all: $(TARGET)
|
|
|
|
install: all
|
|
mkdir -p $(PREFIX)$(PRDPATH)
|
|
install $(TARGET) $(PREFIX)$(PRDPATH)
|
|
|
|
|
|
bpctl.o: bpctl.c
|
|
$(CC) $(CFLAGS) -c bpctl.c
|
|
|
|
$(TARGET): $(OBJS)
|
|
$(CC) $(OBJS) $(LDFLAGS) -o $(TARGET)
|
|
|
|
|
|
clean:
|
|
rm -f $(OBJS) $(TARGET)
|