fa3b59b246
At least now dependencies are tracked, not sure it will be enough for real life :-) --HG-- extra : convert_revision : 962de22d515efa5599c148f918c14d32b5d9496d
33 lines
675 B
Makefile
33 lines
675 B
Makefile
include ../vars.mk
|
|
|
|
# The shared library.
|
|
MAJOR = 0
|
|
MINOR = 0
|
|
MICRO = 0
|
|
LIBXBPS_SO = $(LIBXBPS).$(MAJOR).$(MINOR).$(MICRO)
|
|
LIBXBPS = libxbps.so
|
|
LIBXBPS_LDFLAGS = -larchive -lprop -shared -Wl,-soname,$(LIBXBPS).$(MAJOR)
|
|
|
|
OBJECTS = cmpver.o depends.o humanize_number.o install.o plist.o
|
|
OBJECTS += sha256.o util.o
|
|
|
|
all: $(LIBXBPS)
|
|
.PHONY: all
|
|
|
|
$(LIBXBPS): $(OBJECTS)
|
|
$(CC) $(LIBXBPS_LDFLAGS) $^ -o $(LIBXBPS_SO)
|
|
-ln -sf $(LIBXBPS_SO) $(LIBXBPS).$(MAJOR)
|
|
-ln -sf $(LIBXBPS_SO) $(LIBXBPS)
|
|
|
|
install: $(LIBXBPS)
|
|
install -d $(LIBDIR)
|
|
install -m 644 $(LIBXBPS_SO) $(LIBDIR)
|
|
|
|
.PHONY: clean
|
|
clean: clean-lib clean-objs
|
|
|
|
clean-lib:
|
|
-rm -f $(LIBXBPS)*
|
|
|
|
clean-objs:
|
|
-rm -f *.o
|