Skip to content

Commit

Permalink
Build updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rasa committed Feb 18, 2015
1 parent 4011268 commit dcc36fb
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 42 deletions.
9 changes: 3 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,13 @@

VER?=$(shell perl -n -e '/define\s+VER_STRING2\s+"(.*)"/ && print $$1' version.h)
APP?=$(shell perl -n -e '/define\s+VER_INTERNAL_NAME\s+"(.*)"/ && print $$1' version.h)
VC98?=$(PROGRAMFILES)\\Microsoft Visual Studio\\VC98
MSVC_DIR?=$(shell cygpath -u `cygpath -ds "$(VC98)"`)
CYGENV=MAKEFLAGS="" PATH=$(MSVC_DIR)/bin:$$PATH
APP_FILES=Release/$(APP).exe changelog.txt COPYING readme.txt
SRC_FILES=$(APP_FILES) $(shell ls Makefile *.cpp *.dep *.dsp *.dsw *.h *.ico *.mak *.rc 2>/dev/null)

APP_ZIP?=$(APP)-$(VER)-win32.zip
SRC_ZIP?=$(APP)-$(VER)-win32-src.zip
ZIP?=zip
ZIP_OPTS?=-9jquX
CWD=$(shell pwd)
APP_FILES=Release/$(APP).exe changelog.txt COPYING readme.txt
SRC_FILES=$(APP_FILES) $(shell ls *.cpp *.c *.h *.hpp *.inl *.dsp *.dsw *.mak *.dep Makefile 2>/dev/null)

.PHONY: dist
dist: all $(APP_ZIP) $(SRC_ZIP)
Expand Down
8 changes: 4 additions & 4 deletions nmake.mak
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
all:
$(CYGENV) nmake /f res_set.mak CFG="res_set - Win32 Release" all
$(CYGENV) nmake /f res_set.mak CFG="res_set - Win32 Debug" all
$(MAKE)/f res_set.mak CFG="res_set - Win32 Release" all
$(MAKE)/f res_set.mak CFG="res_set - Win32 Debug" all

clean:
$(CYGENV) nmake /f res_set.mak CFG="res_set - Win32 Release" clean
$(CYGENV) nmake /f res_set.mak CFG="res_set - Win32 Debug" clean
$(MAKE)/f res_set.mak CFG="res_set - Win32 Release" clean
$(MAKE)/f res_set.mak CFG="res_set - Win32 Debug" clean

realclean: clean
-cmd /c del /s *.bak
Expand Down
3 changes: 2 additions & 1 deletion res_set.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ to do:
#define _WIN32_WINNT 0x501

#include <windows.h>
#include <WinUser.h>
#include <stdio.h>
//#include <atlbase.h> // required for Stackwalker
#include <limits.h>
Expand Down Expand Up @@ -1009,7 +1010,7 @@ printf("%s\n", __LINE__);
exit(1);
}
for (n = 0; n < monitors; ++n) {
if (stricmp(optarg, monitor[n].DeviceName) == 0) {
if (_stricmp(optarg, monitor[n].DeviceName) == 0) {
opt.monitor = n;
break;
}
Expand Down
14 changes: 10 additions & 4 deletions res_set.dep
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# Microsoft Developer Studio Generated Dependency File, included by res_set.mak

.\res_set.cpp : \
".\version.h"\
{$(INCLUDE)}"basetsd.h"\
{$(INCLUDE)}"guiddef.h"\
{$(INCLUDE)}"reason.h"\
{$(INCLUDE)}"specstrings.h"\
{$(INCLUDE)}"stralign.h"\
{$(INCLUDE)}"tvout.h"\
{$(INCLUDE)}"debug.h"\
{$(INCLUDE)}"getopt.h"\
{$(INCLUDE)}"Optimize.h"\
{$(INCLUDE)}"Stackwalker.h"\
{$(INCLUDE)}"SystemMessage.h"\
{$(INCLUDE)}"optimize.h"\
{$(INCLUDE)}"stackwalker.h"\
{$(INCLUDE)}"systemmessage.h"\
".\version.h"\
{$(INCLUDE)}"ver_defaults.h"\


Expand Down
85 changes: 59 additions & 26 deletions res_set.mak
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ NULL=
NULL=nul
!ENDIF

CPP=cl.exe
RSC=rc.exe

!IF "$(CFG)" == "res_set - Win32 Release"

OUTDIR=.\Release
Expand All @@ -48,7 +45,40 @@ CLEAN :
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"

CPP=cl.exe
CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\res_set.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c

.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<

.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<

.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<

.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<

.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<

.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<

RSC=rc.exe
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\res_set.res" /d "NDEBUG"
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\res_set.bsc"
Expand Down Expand Up @@ -90,30 +120,8 @@ CLEAN :
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"

CPP=cl.exe
CPP_PROJ=/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\res_set.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\res_set.res" /d "_DEBUG"
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\res_set.bsc"
BSC32_SBRS= \
"$(INTDIR)\res_set.sbr"

"$(OUTDIR)\res_set.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<

LINK32=link.exe
LINK32_FLAGS=sharedd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\res_set.pdb" /debug /machine:I386 /out:"$(OUTDIR)\res_set.exe" /pdbtype:sept
LINK32_OBJS= \
"$(INTDIR)\res_set.obj" \
"$(INTDIR)\res_set.res"

"$(OUTDIR)\res_set.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<

!ENDIF

.c{$(INTDIR)}.obj::
$(CPP) @<<
Expand Down Expand Up @@ -145,6 +153,31 @@ LINK32_OBJS= \
$(CPP_PROJ) $<
<<

RSC=rc.exe
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\res_set.res" /d "_DEBUG"
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\res_set.bsc"
BSC32_SBRS= \
"$(INTDIR)\res_set.sbr"

"$(OUTDIR)\res_set.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<

LINK32=link.exe
LINK32_FLAGS=sharedd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\res_set.pdb" /debug /machine:I386 /out:"$(OUTDIR)\res_set.exe" /pdbtype:sept
LINK32_OBJS= \
"$(INTDIR)\res_set.obj" \
"$(INTDIR)\res_set.res"

"$(OUTDIR)\res_set.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<

!ENDIF


!IF "$(NO_EXTERNAL_DEPS)" != "1"
!IF EXISTS("res_set.dep")
Expand Down
2 changes: 1 addition & 1 deletion res_set.rc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Generated from the TEXTINCLUDE 2 resource.
//
//#include "afxres.h"
#include "windows.h"

/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
Expand Down

0 comments on commit dcc36fb

Please sign in to comment.