📄 win32.mak
字号:
# Windows NT and compiler definitions
# Currently only supports Microsoft Visual C++ and GNU compilers
# Assumes default include paths for the compilers are set properly
# Not Ready yet
$(error Sorry, command line build on Windows NT not yet supported. Use the rv.dsw workspace file)
# Add required info to master lists
# MAKE_LIST - List any OS dependent makefiles (inclduing this one)
# INCLUDE_DIRS - List any OS dependent include directories in search order
# LIBS_LIST - List any OS dependent libraries needed to link executables
MAKE_LIST += win32.mak
INCLUDE_DIRS +=
LIBS_LIST += user32 gdi32 winspool comdlg32 advapi32 shell32 ole32 oleaut32 uuid odbc32 wsock32 winmm
LIB_DIRS +=
# Indicate if executable targets can be built for this OS via these makefiles
# Set to yes if they can be built, no if they can't.
BUILD_EXECUTABLE := yes
# Extention to target name for executable (ie .exe for Windows)
EXECUTE_EXTENTION := .exe
ifeq ($(COMPILER), visualc)
# Compiler setup - Microsoft Visual C++
CC := cl /nologo /MT /W3 /GX
INCLUDE_FLAG := /I
C_DEBUGFLAG := /Gm /ZI /GZ /D"_DEBUG"
C_OPTFLAG := /O2 /D"NDEBUG"
CFLAGS +=
OBJ_EXTENTION := .obj
AR := link -lib
ARFLAGS := /nologo
LIB_EXTENTION := .lib
LINK := link /nologo /subsystem:console /incremental:no
LIBS_FLAG :=
LIBS_DIRFLAG:= /LIBPATH:
LDFLAGS +=
# Define full .d file generation command since they vary so much. The
# target will be the .d file and the first dependency will be the .c file.
MAKEDEPEND = set -e; $(CC) -xM -c $(CFLAGS) $< | \
sort -u | \
sed 's*^*$*.d $(*D)/*' > $@; \
[ -s $@ ] || rm -f $@
else
ifeq ($(COMPILER), gnu)
# Compiler setup - GNU
CC := gcc -mno-cygwin -D_WIN32
INCLUDE_FLAG := -I
C_DEBUGFLAG := -g
C_OPTFLAG := -O3
CFLAGS +=
OBJ_EXTENTION := .o
AR := ar
ARFLAGS := -rc
LIB_EXTENTION := .a
LINK := gcc
LIBS_FLAG := -l
LIBS_DIRFLAG:= -L
LDFLAGS +=
# Define full .d file generation command since they vary so much. The
# target will be the .d file and the first dependency will be the .c file.
MAKEDEPEND = set -e; $(CC) -M -c $(CFLAGS) $< | \
sed '1s*^*$*.d $(*D)/*' > $@; \
else
# Only Microsoft Visual C and gnu are supported for Win32
$(error Compiler '$(COMPILER)' not supported for Win32. Only 'visualc' and 'gnu' are currently supported)
endif
endif
# Build notes from MS makefile
# release
# /nologo /MT /W3 /GX /O2 /I "kernel" /I "mibs" /I "snmpif" /I "transport" /I "util" /D "NDEBUG" /D "_LIB" /D "WIN32" /D "_MBCS" /D "RV_SNMP" /Fp"$(INTDIR)\core.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
# exe opts: /nologo /MT /W3 /GX /O2 /I "..\..\..\core\kernel" /I "..\..\..\core\memory" /I "..\..\..\core\transport" /I "..\..\..\core\util" /I "..\..\common\parser" /I "..\..\common\transport" /I "..\..\common\mibs" /I "..\..\..\epp\common\toolkit" /I "..\epmgr" /I "..\..\..\sdp" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "RV_SNMP" /Fp"$(INTDIR)\mg2.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
# exe diffs -D "_LIBS" becomes -D"_CONSOLE"
# debug
# /nologo /MT /W3 /Gm /GX /ZI /Od /I "kernel" /I "mibs" /I "snmpif" /I "transport" /I "util" /D "_DEBUG" /D "_LIB" /D "WIN32" /D "_MBCS" /D "RV_SNMP" /Fp"$(INTDIR)\core.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
# debug diffs: adds /Gm, /ZI /GZ, replaces /O2 with /Od, replaces /D "NDEBUG" with /D "_DEBUG"
# rc - resource compiler
# bscmake - browse information maintenance utility - opts: /nologo /o"$(OUTDIR)\core.bsc"
# link -lib linker - opts /nologo /out:"$(OUTDIR)\core.lib"
# for exe: link (no -lib)
# exe link opts: kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\mg2.pdb" /machine:I386 /out:"$(OUTDIR)\mg2.exe"
# exe link just adds libs to line (no flag)
# exe link opts for release adds /pdbtype:sept, changes /incremental: to no, removes /debug
#
# compiler
# /MT - link with LIBCMT.LIB
# /W3 - set warning level to 3 (default 1)
# /GX - enable C++ EH
# /O2 - optimize for speed
# /Od - disable optimize
# /Gm - enable minimal rebuild
# /ZI - enable debugging information
# /GZ - enable runtime debug checks
# /Fp"name.pch" - name precompiled header file.
# /Fo"name" - name object file
# /Fd"name" - name .PDB file
# /YX - automatic PCH
# /FD -
# /c - compiler only
#
# linker
# /subsystem:<native|windows|console|windowsce|psoix>
# /incremental:<yes|no>
# /pdbL"name.pdb"
# /machine:<ALPHA|ARM|IX86|MIPS|MIPS16|MIPSR41XX|PPC|SH3|SH4>
# /out"name.exe"
# /pdbtype:<CON[SOLIDATE]|SEPT[YPES]>
# /debug
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -