Can use multiple libraries.
committer: mfx <mfx> 969468769 +0000
This commit is contained in:
parent
bd436acb4d
commit
c9e162ffcf
44
src/Makefile
44
src/Makefile
@ -120,6 +120,7 @@ LDFLAGS += -Wl,-Map,$(basename $@).map
|
||||
LDLIBS =
|
||||
##LDLIBS = -lz
|
||||
LIBDIRS =
|
||||
DOS_LIBDIRS =
|
||||
|
||||
|
||||
###
|
||||
@ -128,37 +129,15 @@ LIBDIRS =
|
||||
|
||||
UCLDIR:=$(strip $(subst \,/,$(UCLDIR)))
|
||||
NRVDIR:=$(strip $(subst \,/,$(NRVDIR)))
|
||||
ifeq ($(strip $(wildcard $(NRVDIR)/include/nrv)),)
|
||||
u = ucl
|
||||
U = UCL
|
||||
upx_exe = upx$e
|
||||
else
|
||||
u = ucl
|
||||
U = UCL
|
||||
upx_exe = upx$e
|
||||
include Makefile.inc
|
||||
ifneq ($(strip $(wildcard $(NRVDIR)/include/nrv)),)
|
||||
u = nrv
|
||||
U = NRV
|
||||
upx_exe = upx_$u$e
|
||||
endif
|
||||
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)
|
||||
include Makefile.inc
|
||||
endif
|
||||
|
||||
tmp := -Wl,--rpath,
|
||||
@ -168,7 +147,6 @@ LDLIBDIRS := $(addprefix -L,$(LIBDIRS))
|
||||
|
||||
##LDFLAGS += $(LDRPATH)
|
||||
LDFLAGS += $(LDLIBDIRS)
|
||||
LDLIBS += -l$(u)
|
||||
|
||||
|
||||
###
|
||||
@ -247,8 +225,8 @@ CXXFLAGS2 = $(CFLAGS)
|
||||
LDFLAGS =
|
||||
LINK_LDFLAGS = /link /map:$(basename $@).map
|
||||
|
||||
ifneq ($(strip $(wildcard $(UDIR))),)
|
||||
LIB := $(UDIR);$(LIB)
|
||||
ifneq ($(strip $(DOS_LIBDIRS)),)
|
||||
LIB := $(DOS_LIBDIRS);$(LIB)
|
||||
endif
|
||||
export LIB
|
||||
|
||||
@ -324,8 +302,8 @@ LDFLAGS =
|
||||
##LDLIBS = $(u).lib zlib.lib
|
||||
LDLIBS = $(u).lib
|
||||
|
||||
ifneq ($(strip $(wildcard $(UDIR))),)
|
||||
LIB := $(UDIR);$(LIB)
|
||||
ifneq ($(strip $(DOS_LIBDIRS)),)
|
||||
LIB := $(DOS_LIBDIRS);$(LIB)
|
||||
endif
|
||||
export LIB
|
||||
|
||||
|
||||
35
src/Makefile.inc
Normal file
35
src/Makefile.inc
Normal file
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user