barrier/dist/nullsoft/Makefile.win

64 lines
2.1 KiB
Makefile
Raw Normal View History

Applied patch by maruel: - Fixed taking the address of begin() on an empty std::vector. - Fixed nsis makefile to use %ProgramFiles% environment variable. - Fixed nsis makefile to pass the output directory and file to makensis. - Fixed synergy.nsi to get the files from the output directory. That enables a debug build of the installer. - Fixes to compile under VS2005. I did not apply VS2005 project files, instead adding nmake files. nmake is pretty weak but the makefiles can be modified without having visual studio. Also modified the .rc files to not use winres.h. This plus nmake means synergy can now be built using the freely downloadable Microsoft Windows SDK for Vista, available from microsoft's web site. This change removes all of the old VC++6 project files in favor of the nmake files. It also removes the XCode project in favor of ./configure and make. All of the nmake files are named nmake.mak. Only the top level makefile is directly useful (the rest are included by it) so all builds are from the top level directory. nmake knows the following targets: all: build synergy.exe, synergyc.exe and synergys.exe clean: remove all intermediate files, keep programs clobber: clean and remove programs installer: build programs and an installer debug: build a debug version of 'all' release: build a release version of 'all' debug-installer: build an installer of the debug build release-installer: build an installer of the release build The default build version is release so 'all' and 'installer' will build a release version. The installer itself never has debug symbols, just the stuff it installs. The default target is 'all'. To build use: nmake /nologo /f nmake.mak <target> VC++ and VisualStudio users may need to manually run vcvars.bat in a command.exe or cmd.exe window before invoking nmake. The Window 98/Me command.exe may not handle potentially long command lines; I haven't tried to verify if that works.
2007-09-06 05:01:44 +00:00
# synergy -- mouse and keyboard sharing utility
# Copyright (C) 2007 Chris Schoeneman
#
# This package is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# found in the file COPYING that should have accompanied this file.
#
# This package is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
NSIS = "$(PROGRAMFILES)\NSIS\makensis.exe"
NSIS_FLAGS = /NOCD /V1
BIN_INSTALLER_SRC = dist\nullsoft
BIN_INSTALLER_DST = $(BUILD_DST)\$(BIN_INSTALLER_SRC)
BIN_DOSIFY_EXE = "$(BIN_INSTALLER_DST)\dosify.exe"
BIN_DOSIFY_C = \
"$(BIN_INSTALLER_SRC)\dosify.c" \
$(NULL)
BIN_DOSIFY_OBJ = \
"$(BIN_INSTALLER_DST)\dosify.obj" \
$(NULL)
BIN_INSTALLER_NSI = "$(BIN_INSTALLER_SRC)\synergy.nsi"
BIN_INSTALLER_EXE = "$(BUILD_DST)\SynergyInstaller.exe"
BIN_INSTALLER_DOCS = \
COPYING \
ChangeLog \
$(NULL)
BIN_INSTALLER_DOS_DOCS = \
$(BUILD_DST)\COPYING.txt \
$(BUILD_DST)\ChangeLog.txt \
$(NULL)
C_FILES = $(C_FILES) $(BIN_DOSIFY_C)
OBJ_FILES = $(OBJ_FILES) $(BIN_DOSIFY_OBJ)
OPTPROGRAMS = $(OPTPROGRAMS) $(BIN_DOSIFY_EXE)
# Build rules.
$(BIN_DOSIFY_OBJ): $(BIN_DOSIFY_C)
@$(ECHO) Compile $(BIN_DOSIFY_C)
-@$(MKDIR) $(BIN_INSTALLER_DST) 2>NUL:
$(cc) $(cdebug) $(cflags) $(cvars) /Fo$@ /Fd$(@:.obj=.pdb) $**
$(BIN_DOSIFY_EXE): $(BIN_DOSIFY_OBJ)
@$(ECHO) Link $(@F)
$(link) $(ldebug) $(conlflags) $(conlibsmt) /out:$@ $**
# Convert text files from Unix to DOS format.
$(BIN_INSTALLER_DOS_DOCS): $(BIN_DOSIFY_EXE) $(BIN_INSTALLER_DOCS)
@$(ECHO) Convert text files to DOS format
$(BIN_DOSIFY_EXE) "." "$(BUILD_DST)" $(BIN_INSTALLER_DOCS)
# Allow installers for both debug and release.
$(BIN_INSTALLER_EXE): $(BIN_INSTALLER_NSI) all $(BIN_INSTALLER_DOS_DOCS)
@$(ECHO) Build $(@F)
$(NSIS) $(NSIS_FLAGS) /DOUTPUTDIR=$(@D) /DOUTPUTFILE=$@ $(BIN_INSTALLER_NSI)
installer: $(BIN_INSTALLER_EXE)
debug-installer:
@$(MAKE) /nologo /f $(MAKEFILE) DEBUG=1 installer
release-installer:
@$(MAKE) /nologo /f $(MAKEFILE) NODEBUG=1 installer