Renamed environment variable UCLDIR to UPX_UCLDIR.

This commit is contained in:
Markus F.X.J. Oberhumer
2006-06-09 15:22:42 +02:00
parent 39732eee5e
commit 54340ab4bf
2 changed files with 26 additions and 19 deletions
+18 -11
View File
@@ -15,10 +15,12 @@ VPATH := . $(srcdir)
endif endif
ifeq ($(CXX),) ifeq ($(CXX),)
USE_GNUC = 1
CXX = g++ CXX = g++
endif endif
ifneq ($(USE_GNUC),) ifeq ($(firstword $(CXX)),g++)
USE_GNUC ?= 1
endif
ifeq ($(USE_GNUC),1)
CXXFLAGS += -O2 -MMD CXXFLAGS += -O2 -MMD
CXXFLAGS += -Wall -W -Wcast-align -Wcast-qual -Wpointer-arith -Wwrite-strings -Werror CXXFLAGS += -Wall -W -Wcast-align -Wcast-qual -Wpointer-arith -Wwrite-strings -Werror
endif endif
@@ -29,15 +31,17 @@ exeext ?= .out
libext ?= .a libext ?= .a
objext ?= .o objext ?= .o
# we need UCL and zlib - you can set envvar UCLDIR # we need UCL and zlib - you can set envvar UPX_UCLDIR
ifneq ($(wildcard $(UCLDIR)/include/ucl/ucl.h),) ifneq ($(wildcard $(UPX_UCLDIR)/include/ucl/ucl.h),)
INCLUDES += -I$(UCLDIR)/include INCLUDES += -I$(UPX_UCLDIR)/include
LIBS += $(addprefix -L,$(dir $(wildcard $(UCLDIR)/libucl$(libext) $(UCLDIR)/src/.libs/libucl$(libext)))) LIBS += $(addprefix -L,$(dir $(wildcard $(UPX_UCLDIR)/libucl$(libext) $(UPX_UCLDIR)/src/.libs/libucl$(libext))))
endif
ifneq ($(wildcard $(LZMADIR)/include/ucl/ucl.h),)
INCLUDES += -I$(LZMADIR)
endif endif
LIBS += -lucl -lz LIBS += -lucl -lz
# you should set envvar UPX_LZMADIR to point to your unpacked lzma443.tar.bz2
ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip),)
DEFS += -DWITH_LZMA
INCLUDES += -I$(LZMADIR)
endif
upx_SOURCES := $(wildcard $(srcdir)/*.cpp) upx_SOURCES := $(wildcard $(srcdir)/*.cpp)
upx_OBJECTS := $(notdir $(upx_SOURCES:.cpp=$(objext))) upx_OBJECTS := $(notdir $(upx_SOURCES:.cpp=$(objext)))
@@ -52,8 +56,11 @@ upx$(exeext): $(upx_OBJECTS) $(upx_DEPENDENCIES)
%.o : %.cpp %.o : %.cpp
$(strip $(CXX) $(call e,CPPFLAGS) $(call e,CXXFLAGS) -o $@ -c $<) $(strip $(CXX) $(call e,CPPFLAGS) $(call e,CXXFLAGS) -o $@ -c $<)
ifneq ($(USE_GNUC),) ifeq ($(USE_GNUC),1)
compress.o : CXXFLAGS += -Wno-non-virtual-dtor compress_lzma$(objext) : EXTRA_CXXFLAGS += -Wno-cast-qual
compress_lzma$(objext) : EXTRA_CXXFLAGS += -Wno-non-virtual-dtor
compress_lzma$(objext) : EXTRA_CXXFLAGS += -Wno-unused
##compress_lzma$(objext) : EXTRA_CXXFLAGS += -Wno-error
endif endif
mostlyclean clean distclean maintainer-clean: mostlyclean clean distclean maintainer-clean:
+8 -8
View File
@@ -8,12 +8,12 @@
MAKEFLAGS += -rR MAKEFLAGS += -rR
SHELL = /bin/sh SHELL = /bin/sh
ifeq ($(strip $(UCLDIR)),) ifeq ($(strip $(UPX_UCLDIR)),)
# change this to reflect where the UCL library is # change this to reflect where the UCL library is
UCLDIR = $(HOME)/local/src/ucl-1.03 UPX_UCLDIR = $(HOME)/local/src/ucl-1.03
endif endif
ifeq ($(wildcard $(UCLDIR)/upx),) ifeq ($(wildcard $(UPX_UCLDIR)/upx),)
$(error Please set UCLDIR in Makefile or environment) $(error Please set UPX_UCLDIR in Makefile or environment)
endif endif
# update path for our special stub build tools # update path for our special stub build tools
@@ -68,10 +68,10 @@ MAKEFILE_DEPS = $(MAKEFILE_LIST)
# // source directories # // source directories
# ************************************************************************/ # ************************************************************************/
UCL_UPX = $(UCLDIR)/upx UCL_UPX = $(UPX_UCLDIR)/upx
UCL_I386 = $(UCLDIR)/upx/i386 UCL_I386 = $(UPX_UCLDIR)/upx/i386
UCL_M68K = $(UCLDIR)/upx/m68k UCL_M68K = $(UPX_UCLDIR)/upx/m68k
UCL_MR3K = $(UCLDIR)/upx/mr3k UCL_MR3K = $(UPX_UCLDIR)/upx/mr3k
.SUFFIXES: .SUFFIXES:
.SUFFIXES: .asm .ash .asx .asy .bin .c .h .s .SUFFIXES: .asm .ash .asx .asy .bin .c .h .s