patch #1005299 - Source/Makefile for building on POSIX systems
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3618 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
44e438a91f
commit
c78720010b
1 changed files with 15 additions and 6 deletions
|
@ -1,19 +1,24 @@
|
|||
#
|
||||
# This makefile for mingw32 by Nels. Thanks, Nels
|
||||
#
|
||||
# Generalized for building on POSIX systems by Bas Mevissen
|
||||
#
|
||||
|
||||
# -- Objects and source files --
|
||||
SRCS = zlib/deflate.c zlib/trees.c bzip2/blocksort.c bzip2/bzlib.c bzip2/compress.c bzip2/huffman.c 7zip/7zGuids.cpp 7zip/Common/CRC.cpp 7zip/7zip/Compress/LZ/LZInWindow.cpp 7zip/7zip/Compress/LZMA/LZMAEncoder.cpp 7zip/7zip/Compress/LZMA/LZMALen.cpp 7zip/7zip/Compress/LZMA/LZMALiteral.cpp 7zip/7zip/Common/OutBuffer.cpp 7zip/7zip/Compress/RangeCoder/RangeCoderBit.cpp build.cpp crc32.c DialogTemplate.cpp exedata.cpp lang.cpp makenssi.cpp Plugins.cpp ResourceEditor.cpp ResourceVersionInfo.cpp script.cpp tokens.cpp util.cpp
|
||||
OBJS = 7zGuids.o blocksort.o build.o bzlib.o compress.o CRC.o crc32.o deflate.o DialogTemplate.o exedata.o huffman.o lang.o LZInWindow.o LZMAEncoder.o LZMALen.o LZMALiteral.o makenssi.o OutBuffer.o Plugins.o RangeCoderBit.o ResourceEditor.o ResourceVersionInfo.o script.o tokens.o trees.o util.o
|
||||
ifeq "$(strip $(findstring i386pe,$(shell ld -V)))" ""
|
||||
LIBS = -lstdc++ -lpthread
|
||||
EXESUFF =
|
||||
else
|
||||
LIBS = -lgdi32 -lversion -lstdc++
|
||||
EXESUFF = .exe
|
||||
endif
|
||||
|
||||
# -- Programs --
|
||||
MAKE = make
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
RM = rm
|
||||
|
||||
# -- Compilers and linker flags --
|
||||
|
@ -21,7 +26,11 @@ DEFINES = -DCOMPRESS_MF_BT
|
|||
CFLAGS = -Wall -O3
|
||||
CXXFLAGS = -Wall -O3
|
||||
CPPFLAGS = $(DEFINES)
|
||||
LDFLAGS = -s -Wl,-Map,$(subst .exe,.map,$@)
|
||||
ifneq ($(EXESUFF),)
|
||||
LDFLAGS = -s -Wl,-Map,$(subst $(EXESUFF),.map,$@)
|
||||
else
|
||||
LDFLAGS = -s -Wl,-Map,$@.map
|
||||
endif
|
||||
|
||||
all : exehead makensis
|
||||
|
||||
|
@ -33,12 +42,12 @@ rs = bitmap1.h icon.h unicon.h
|
|||
deps = $(foreach c,$(cs),exehead/Release-$(c)/exehead_$(c).h) $(foreach r,$(rs),exehead/Release-zlib/$(r))
|
||||
$(deps) : exehead
|
||||
|
||||
makensis : ../makensis.exe
|
||||
makensis : ../makensis$(EXESUFF)
|
||||
|
||||
exedata.o : $(deps)
|
||||
|
||||
../makensis.exe : $(SRCS) $(OBJS)
|
||||
$(CC) -Wall $(LDFLAGS) -o ../makensis.exe $(OBJS) $(LIBS)
|
||||
../makensis$(EXESUFF) : $(SRCS) $(OBJS)
|
||||
$(CC) -Wall $(LDFLAGS) -o ../makensis$(EXESUFF) $(OBJS) $(LIBS)
|
||||
|
||||
VPATH=zlib:bzip2:7zip:7zip/Common:7zip/7zip:7zip/7zip/Compress/LZ:7zip/7zip/Compress/LZMA:7zip/7zip/Common:7zip/7zip/Compress/RangeCoder
|
||||
|
||||
|
@ -53,7 +62,7 @@ clean : clean_makensis
|
|||
|
||||
clean_makensis :
|
||||
$(RM) -f *.o
|
||||
$(RM) -f ../makensis.exe
|
||||
$(RM) -f ../makensis$(EXESUFF) ../makensis.map
|
||||
|
||||
# -- Phony targets --
|
||||
.PHONY : exehead makensis clean clean_makensis
|
||||
.PHONY : exehead makensis clean clean_makensis
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue