Verified Commit fedd2b7b authored by Max Rees's avatar Max Rees

Cleanup src/Makefile a little more

parent 0b162d3d
......@@ -22,7 +22,7 @@ install-LUA_LIB-y := $(INSTALLDIR) $(DESTDIR)$(LUA_LIBDIR) && \
$(INSTALL) $(LUA_LIB-y) $(DESTDIR)$(LUA_LIBDIR)
endif
progs-y += apk
progs-y += apk
apk-objs := apk.o add.o del.o fix.o update.o info.o list.o \
search.o upgrade.o cache.o ver.o index.o fetch.o \
audit.o verify.o dot.o policy.o stats.o manifest.o
......@@ -33,7 +33,7 @@ libapk.so-objs := common.o database.o package.o archive.o \
libapk.so-libs := libfetch/libfetch.a
ifeq ($(TEST),y)
progs-y += apk-test
progs-y += apk-test
apk-test-objs := apk-test.o $(filter-out apk.o, $(apk-objs))
endif
......@@ -45,6 +45,8 @@ apk-libs += $(libapk.so-libs)
apk-test-libs += $(libapk.so-libs)
apk.so-libs += $(libapk.so-libs)
else
apk.static-objs := $(libapk.so-objs)
apk.static-libs := $(libapk.so-libs)
LIBAPK := YesPlease
LIBS_apk := -lapk
LIBS_apk-test := -lapk
......@@ -66,15 +68,11 @@ CFLAGS_apk.o := -DAPK_VERSION=\"$(FULL_VERSION)\"
CFLAGS_apk-static.o := -DAPK_VERSION=\"$(FULL_VERSION)\" -DOPENSSL_NO_ENGINE
CFLAGS_apk-test.o := -DAPK_VERSION=\"$(FULL_VERSION)\" -DOPENSSL_NO_ENGINE -DTEST_MODE
progs-$(STATIC) += apk.static
apk.static-objs := $(filter-out apk.o,$(apk-objs)) apk-static.o
apk.static-libs := $(apk-libs)
ifneq ($(SHARED_LIBAPK),)
apk.static-objs += $(libapk.so-objs)
apk.static-libs += $(libapk.so-libs)
endif
progs-$(STATIC) += apk.static
apk.static-objs += $(filter-out apk.o,$(apk-objs)) apk-static.o
apk.static-libs += $(apk-libs)
LDFLAGS_apk.static := -static
LIBS_apk.static := -Wl,--as-needed -ldl -Wl,--no-as-needed
LIBS_apk.static := -Wl,--as-needed -ldl -Wl,--no-as-needed
LDFLAGS_apk += -L$(obj)
LDFLAGS_apk-test += -L$(obj)
LDFLAGS_libapk.so += -Wl,-soname,$(LIBAPK_SONAME)
......@@ -96,4 +94,3 @@ install: $(obj)/apk $(LIBAPK-y) $(LUA_LIB-y)
$(INSTALL) $(obj)/apk $(DESTDIR)$(SBINDIR)
$(install-LIBAPK-y)
$(install-LUA_LIB-y)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment