Can use multiple libraries.
committer: mfx <mfx> 969468769 +0000
This commit is contained in:
+11
-33
@@ -120,6 +120,7 @@ LDFLAGS += -Wl,-Map,$(basename $@).map
|
|||||||
LDLIBS =
|
LDLIBS =
|
||||||
##LDLIBS = -lz
|
##LDLIBS = -lz
|
||||||
LIBDIRS =
|
LIBDIRS =
|
||||||
|
DOS_LIBDIRS =
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -128,37 +129,15 @@ LIBDIRS =
|
|||||||
|
|
||||||
UCLDIR:=$(strip $(subst \,/,$(UCLDIR)))
|
UCLDIR:=$(strip $(subst \,/,$(UCLDIR)))
|
||||||
NRVDIR:=$(strip $(subst \,/,$(NRVDIR)))
|
NRVDIR:=$(strip $(subst \,/,$(NRVDIR)))
|
||||||
ifeq ($(strip $(wildcard $(NRVDIR)/include/nrv)),)
|
u = ucl
|
||||||
u = ucl
|
U = UCL
|
||||||
U = UCL
|
upx_exe = upx$e
|
||||||
upx_exe = upx$e
|
include Makefile.inc
|
||||||
else
|
ifneq ($(strip $(wildcard $(NRVDIR)/include/nrv)),)
|
||||||
u = nrv
|
u = nrv
|
||||||
U = NRV
|
U = NRV
|
||||||
upx_exe = upx_$u$e
|
upx_exe = upx_$u$e
|
||||||
endif
|
include Makefile.inc
|
||||||
UDIR := $($(U)DIR)
|
|
||||||
|
|
||||||
DEFS += -DWITH_$(U)
|
|
||||||
ifneq ($(strip $(wildcard $(UDIR)/include)),)
|
|
||||||
INCLUDES += -I$(UDIR)/include
|
|
||||||
endif
|
|
||||||
ifneq ($(strip $(wildcard $(UDIR)/src/.libs)),)
|
|
||||||
LIBDIRS += $(UDIR)/src/.libs
|
|
||||||
endif
|
|
||||||
ifeq ($(DEBUG),1)
|
|
||||||
ifneq ($(strip $(wildcard $(UDIR)/build/debug/src/.libs)),)
|
|
||||||
LIBDIRS += $(UDIR)/build/debug/src/.libs
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
ifneq ($(strip $(wildcard $(UDIR)/build/release/src/.libs)),)
|
|
||||||
LIBDIRS += $(UDIR)/build/release/src/.libs
|
|
||||||
endif
|
|
||||||
ifneq ($(strip $(wildcard $(UDIR)/build/src/.libs)),)
|
|
||||||
LIBDIRS += $(UDIR)/build/src/.libs
|
|
||||||
endif
|
|
||||||
ifneq ($(strip $(wildcard $(UDIR))),)
|
|
||||||
LIBDIRS += $(UDIR)
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
tmp := -Wl,--rpath,
|
tmp := -Wl,--rpath,
|
||||||
@@ -168,7 +147,6 @@ LDLIBDIRS := $(addprefix -L,$(LIBDIRS))
|
|||||||
|
|
||||||
##LDFLAGS += $(LDRPATH)
|
##LDFLAGS += $(LDRPATH)
|
||||||
LDFLAGS += $(LDLIBDIRS)
|
LDFLAGS += $(LDLIBDIRS)
|
||||||
LDLIBS += -l$(u)
|
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -247,8 +225,8 @@ CXXFLAGS2 = $(CFLAGS)
|
|||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
LINK_LDFLAGS = /link /map:$(basename $@).map
|
LINK_LDFLAGS = /link /map:$(basename $@).map
|
||||||
|
|
||||||
ifneq ($(strip $(wildcard $(UDIR))),)
|
ifneq ($(strip $(DOS_LIBDIRS)),)
|
||||||
LIB := $(UDIR);$(LIB)
|
LIB := $(DOS_LIBDIRS);$(LIB)
|
||||||
endif
|
endif
|
||||||
export LIB
|
export LIB
|
||||||
|
|
||||||
@@ -324,8 +302,8 @@ LDFLAGS =
|
|||||||
##LDLIBS = $(u).lib zlib.lib
|
##LDLIBS = $(u).lib zlib.lib
|
||||||
LDLIBS = $(u).lib
|
LDLIBS = $(u).lib
|
||||||
|
|
||||||
ifneq ($(strip $(wildcard $(UDIR))),)
|
ifneq ($(strip $(DOS_LIBDIRS)),)
|
||||||
LIB := $(UDIR);$(LIB)
|
LIB := $(DOS_LIBDIRS);$(LIB)
|
||||||
endif
|
endif
|
||||||
export LIB
|
export LIB
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
UDIR := $($(U)DIR)
|
||||||
|
|
||||||
|
DEFS += -DWITH_$(U)
|
||||||
|
|
||||||
|
ifneq ($(strip $(wildcard $(UDIR)/include)),)
|
||||||
|
INCLUDES += -I$(UDIR)/include
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(strip $(wildcard $(UDIR)/src/.libs)),)
|
||||||
|
LIBDIRS += $(UDIR)/src/.libs
|
||||||
|
endif
|
||||||
|
ifeq ($(DEBUG),1)
|
||||||
|
ifneq ($(strip $(wildcard $(UDIR)/build/debug/src/.libs)),)
|
||||||
|
LIBDIRS += $(UDIR)/build/debug/src/.libs
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
ifneq ($(strip $(wildcard $(UDIR)/build/release/src/.libs)),)
|
||||||
|
LIBDIRS += $(UDIR)/build/release/src/.libs
|
||||||
|
endif
|
||||||
|
ifneq ($(strip $(wildcard $(UDIR)/build/src/.libs)),)
|
||||||
|
LIBDIRS += $(UDIR)/build/src/.libs
|
||||||
|
endif
|
||||||
|
ifneq ($(strip $(wildcard $(UDIR))),)
|
||||||
|
LIBDIRS += $(UDIR)
|
||||||
|
DOS_LIBDIRS := $(DOS_LIBDIRS);$(UDIR)
|
||||||
|
endif
|
||||||
|
|
||||||
|
LDLIBS += -l$(u)
|
||||||
|
|
||||||
|
|
||||||
|
DEFS := $(DEFS)
|
||||||
|
INCLUDES := $(INCLUDES)
|
||||||
|
LIBDIRS := $(LIBDIRS)
|
||||||
|
LDLIBS := $(LDLIBS)
|
||||||
|
|
||||||
Reference in New Issue
Block a user