- makensis should now compile on any POSIX compliment platform (Linux, *BSD, Mac OS X, etc.)
- improved makefiles so nothing is compiled when it's already up-to-date - Added SW_HIDE to ExecShell's accepted show modes git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3518 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
8567625b0e
commit
4c5f8a30eb
46 changed files with 2054 additions and 679 deletions
|
@ -5,79 +5,52 @@
|
|||
# -- 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
|
||||
else
|
||||
LIBS = -lgdi32 -lversion -lstdc++
|
||||
|
||||
# -- Required .h files --
|
||||
BASEINC = Platform.h exehead/config.h
|
||||
endif
|
||||
|
||||
# -- Programs --
|
||||
MAKE = make
|
||||
CC = gcc
|
||||
RC = windres
|
||||
RM = rm
|
||||
|
||||
# -- Compilers and linker flags --
|
||||
DEFINES = -DWIN32 -D_WINDOWS_
|
||||
CFLAGS = -Wall -O2 $(DEFINES)
|
||||
CPPFLAGS = -Wall -O2 $(DEFINES)
|
||||
LFLAGS = -s
|
||||
RCFLAGS = --input-format rc --output-format coff
|
||||
DEFINES = -DCOMPRESS_MF_BT
|
||||
CFLAGS = -Wall -O3
|
||||
CXXFLAGS = -Wall -O3
|
||||
CPPFLAGS = $(DEFINES)
|
||||
LDFLAGS = -s -Wl,-Map,$(subst .exe,.map,$@)
|
||||
|
||||
all : exehead_zlib exehead_bzip2 exehead_lzma exehead_resources makensis
|
||||
all : makensis
|
||||
|
||||
exehead_zlib exehead_bzip2 exehead_lzma exehead_resources :
|
||||
$(MAKE) -C exehead $@
|
||||
cs = zlib bzip2 lzma
|
||||
rs = bitmap1.h icon.h unicon.h
|
||||
deps = $(foreach c,$(cs),exehead/Release-$(c)/exehead_$(c).h) $(foreach r,$(rs),exehead/Release-zlib/$(r))
|
||||
exehead : $(deps)
|
||||
$(deps) :
|
||||
$(MAKE) -C exehead $(foreach d,$^,$(subst exehead/,,$(d)))
|
||||
|
||||
makensis : $(OBJS)
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) $(LFLAGS) -o ../makensis.exe $(OBJS) $(LIBS)
|
||||
makensis : ../makensis.exe
|
||||
|
||||
# -- Dependencies --
|
||||
build.o : build.cpp ./zlib/zlib.h $(BASEINC) ./exehead/fileform.h ./exehead/resource.h exedata.h build.h util.h strlist.h lineparse.h ResourceEditor.h Makefile
|
||||
exedata.o : exedata.cpp exedata.h ./exehead/Release-zlib/bitmap1.h ./exehead/Release-zlib/icon.h ./exehead/Release-zlib/unicon.h ./exehead/Release-zlib/exehead_zlib.h Makefile
|
||||
makenssi.o : makenssi.cpp build.h util.h exedata.h strlist.h lineparse.h ./exehead/fileform.h $(BASEINC) Makefile
|
||||
script.o : script.cpp tokens.h build.h util.h exedata.h strlist.h lineparse.h ResourceEditor.h DialogTemplate.h ./exehead/resource.h ./exehead/fileform.h $(BASEINC) Makefile
|
||||
tokens.o : tokens.cpp build.h tokens.h Makefile
|
||||
util.o : util.cpp ./exehead/fileform.h util.h strlist.h ResourceEditor.h Makefile
|
||||
crc32.o : crc32.c $(BASEINC) Makefile
|
||||
ResourceEditor.o : ResourceEditor.cpp
|
||||
DialogTemplate.o : DialogTemplate.cpp
|
||||
../makensis.exe : $(SRCS) $(OBJS) $(deps)
|
||||
$(CC) -Wall $(LDFLAGS) -o ../makensis.exe $(OBJS) $(LIBS)
|
||||
|
||||
# -- Special command lines for zlib --
|
||||
deflate.o : zlib/deflate.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
trees.o : zlib/trees.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
VPATH=zlib:bzip2:7zip:7zip/Common:7zip/7zip:7zip/7zip/Compress/LZ:7zip/7zip/Compress/LZMA:7zip/7zip/Common:7zip/7zip/Compress/RangeCoder
|
||||
|
||||
# -- Special command lines for bzip2 --
|
||||
blocksort.o : bzip2/blocksort.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
bzlib.o : bzip2/bzlib.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
compress.o : bzip2/compress.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
huffman.o : bzip2/huffman.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
# -- Special command lines for lzma --
|
||||
7zGuids.o : 7zip/7zGuids.cpp
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
CRC.o : 7zip/Common/CRC.cpp
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
LZInWindow.o : 7zip/7zip/Compress/LZ/LZInWindow.cpp
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
LZMAEncoder.o : 7zip/7zip/Compress/LZMA/LZMAEncoder.cpp
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
LZMALen.o : 7zip/7zip/Compress/LZMA/LZMALen.cpp
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
LZMALiteral.o : 7zip/7zip/Compress/LZMA/LZMALiteral.cpp
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
OutBuffer.o : 7zip/7zip/Common/OutBuffer.cpp
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
RangeCoderBit.o : 7zip/7zip/Compress/RangeCoder/RangeCoderBit.cpp
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
# -- Some dependencies --
|
||||
$(OBJS) : Platform.h exehead/config.h
|
||||
build.o : czlib.h cbzip2.h clzma.h exehead/fileform.h
|
||||
script.o : exehead/fileform.h tokens.h
|
||||
|
||||
# -- Clean script --
|
||||
clean ::
|
||||
clean : clean_makensis
|
||||
$(MAKE) -C exehead clean
|
||||
$(RM) *.o
|
||||
$(RM) ../makensis.exe
|
||||
|
||||
clean_makensis :
|
||||
$(RM) -f *.o
|
||||
$(RM) -f ../makensis.exe
|
||||
|
||||
# -- Phony targets --
|
||||
.PHONY : exehead makensis clean clean_makensis
|
Loading…
Add table
Add a link
Reference in a new issue