f80e1753a8
The library is only responsible now to find all binary packages from repositories, sort them and create a dictionary with all details. The frontend (xbps-bin) provides support for this, and this allows for more flexibility and removes some stuff that didn't belong in the library. While here implemented support to show total download/installed size for all packages that are going to be installed. Next step will be to implement user interactivity before installing/removing/updating packages. --HG-- extra : convert_revision : 858e9a89bc6a60b348435f2416a8af3ebb6ea5c9
36 lines
835 B
Makefile
36 lines
835 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 fexec.o findpkg.o humanize_number.o
|
|
OBJECTS += orphans.o plist.o register.o remove.o repository.o requiredby.o
|
|
OBJECTS += sha256.o sortdeps.o unpack.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)
|
|
cp -a $(LIBXBPS) $(LIBDIR)
|
|
cp -a $(LIBXBPS).$(MAJOR) $(LIBDIR)
|
|
|
|
.PHONY: clean
|
|
clean: clean-lib clean-objs
|
|
|
|
clean-lib:
|
|
-rm -f $(LIBXBPS)*
|
|
|
|
clean-objs:
|
|
-rm -f *.o
|