123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- # See LICENSE file for copyright and license details.
- include config.mk
- SRC = unfy.c unfp.c
- OBJ = $(SRC:.c=.o)
- LIB = libunfy.a
- INC = unfy.h unfp.h
- PKG_STR = "\nIf this is a local install you may need to run:\n\t\
- \"export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig\" \nto use this library.\n"
- .PHONY: all install uninstall clean
- all: $(LIB)
- $(LIB): $(OBJ)
- @$(AR) -rcs $@ $(OBJ)
- .c.o:
- @$(CC) $(CFLAGS) -c $<
- unfy.3.gz: unfy.3
- @gzip -k unfy.3
- install: $(LIB) $(INC) unfy.3.gz unfy.pc unfp.pc
- @echo @ install libunfy to $(PREFIX)
- @mkdir -p $(PREFIX)/lib
- @cp $(LIB) $(PREFIX)/lib/
- @echo @ install $(INC) to $(PREFIX)
- @mkdir -p $(PREFIX)/include/unfy
- @cp $(INC) $(PREFIX)/include/unfy/
- @echo @ install unfy.3 to $(PREFIX)
- @mkdir -p $(PREFIX)/share/man/man3
- @cp unfy.3.gz $(PREFIX)/share/man/man3/
- @mandb -q -p
- @echo @ install unfy.pc and unfp.pc to $(PREFIX)
- @printf $(PKG_STR)
- @mkdir -p $(PREFIX)/lib/pkgconfig
- @cp unfy.pc $(PREFIX)/lib/pkgconfig/
- @cp unfp.pc $(PREFIX)/lib/pkgconfig/
- uninstall:
- @echo @ uninstall unfy from $(PREFIX)
- @rm -f $(PREFIX)/lib/$(LIB)
- @rm -rf $(PREFIX)/include/unfy
- @rm -f $(PREFIX)/share/man/man3/unfy.3.gz
- @rm -f $(PREFIX)/lib/pkgconfig/unfy.pc
- @rm -f $(PREFIX)/lib/pkgconfig/unfp.pc
- clean:
- @rm -f $(LIB) $(OBJ) unfy.3.gz
|