mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-16 22:35:09 -05:00
86b136bb59
* Removed some unnecessary headers and library links * Made things static if possible * Cleaned up makefiles a bit * Fixed some old comments in the code * Fixed some errors the static code checker splint pointed out * Backwards arguments in a memset call in _alpm_db_read (could have been worse) * Other various small fixes Other: * Default to 80 columns when getcols cannot determine display width * Removal of ._install as a valid install file in packages
43 lines
940 B
Makefile
43 lines
940 B
Makefile
top_srcdir = @top_srcdir@
|
|
prefix = @prefix@
|
|
|
|
CFLAGS = $(subst -Werror,,@CFLAGS@)
|
|
CFLAGS += $(shell perl -MExtUtils::Embed -e ccopts)
|
|
CFLAGS += -I$(top_srcdir)/lib/libalpm
|
|
ifeq ($(shell arch),x86_64)
|
|
CFLAGS += -fPIC
|
|
endif
|
|
LDFLAGS += -L$(top_srcdir)/lib/libalpm/.libs -lalpm
|
|
LIBDIR += $(shell perl -V|grep site|sed 's/^ *//;s|/usr|$(prefix)|;q')
|
|
|
|
all: Core.so
|
|
|
|
Core.so: alpm_wrap.o
|
|
$(CC) -shared -Wl,-soname,$@ -o $@ $^ $(LDFLAGS)
|
|
|
|
alpm_wrap.o: alpm_wrap.c
|
|
$(CC) $(CFLAGS) -c -o $@ -include alpm.h $^
|
|
|
|
alpm_wrap.c:
|
|
cp $(top_srcdir)/lib/libalpm/alpm.h ./
|
|
cp $(top_srcdir)/bindings/alpm.i ./
|
|
swig -perl alpm.i
|
|
|
|
install: install-so install-pm
|
|
|
|
install-so: Core.so
|
|
mkdir -p $(DESTDIR)$(LIBDIR)/auto/Alpm/Core
|
|
install $^ $(DESTDIR)$(LIBDIR)/auto/Alpm/Core/
|
|
|
|
install-pm: Core.pm
|
|
mkdir -p $(DESTDIR)$(LIBDIR)/Alpm/
|
|
install -m644 $^ $(DESTDIR)$(LIBDIR)/Alpm/
|
|
|
|
clean:
|
|
rm -f Core* alpm{.h,.i,_wrap*}
|
|
|
|
distclean: clean
|
|
rm -f Makefile
|
|
|
|
check:
|