diff options
author | Vlad Mironov <mironych@googlemail.com> | 2014-05-26 07:14:46 +0000 |
---|---|---|
committer | Vlad Mironov <mironych@googlemail.com> | 2014-05-26 07:14:46 +0000 |
commit | ff2c1ae9669e5b164a36bd372729948537110928 (patch) | |
tree | 50a26632f5d916f0a3a904a753c25ca4a87f8e8c | |
parent | 5a5375019687667b06b011958c7cf595e1a80e0b (diff) |
another gcc compilation fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@9311 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | plugins/ExternalAPI/m_skin_eng.h | 4 | ||||
-rw-r--r-- | plugins/TrafficCounter/.cproject | 31 | ||||
-rw-r--r-- | plugins/TrafficCounter/makefile_gcc | 78 | ||||
-rw-r--r-- | plugins/TrafficCounter/res/resource.rc | 4 |
4 files changed, 103 insertions, 14 deletions
diff --git a/plugins/ExternalAPI/m_skin_eng.h b/plugins/ExternalAPI/m_skin_eng.h index b00178d623..a25724a485 100644 --- a/plugins/ExternalAPI/m_skin_eng.h +++ b/plugins/ExternalAPI/m_skin_eng.h @@ -188,8 +188,6 @@ int __inline SkinDrawWindowBack(HWND hwndIn, HDC hdc, RECT * rcClip, char * obje }
-//Paint ObjectID
-int __inline SkinDrawGlyph(HDC hdc, RECT * rcSize, RECT * rcClip, char * objectID);
//Register object with predefined style
int __inline CreateGlyphedObjectDefStyle(char * ObjID,BYTE defStyle);
@@ -252,6 +250,8 @@ static BOOL __inline ScreenToClientRect(HWND hWnd, LPRECT lpRect) // prm.szObjectID=ObjID;
// return CallService(MS_SKIN_REGISTERDEFOBJECT,(WPARAM)&prm,0);
//}
+
+//Paint ObjectID
static int __inline SkinDrawGlyph(HDC hdc, RECT * rcSize, RECT * rcClip, char * objectID)
{
SKINDRAWREQUEST rq;
diff --git a/plugins/TrafficCounter/.cproject b/plugins/TrafficCounter/.cproject index d1ce15cca3..5604f09f6b 100644 --- a/plugins/TrafficCounter/.cproject +++ b/plugins/TrafficCounter/.cproject @@ -34,7 +34,7 @@ <option id="org.eclipse.cdt.msvc.cl.option.includes.441685381" name="Include Path (/I)" superClass="org.eclipse.cdt.msvc.cl.option.includes" valueType="includePath">
<listOptionValue builtIn="false" value=""..\..\..\Include""/>
<listOptionValue builtIn="false" value=""..\..\ExternalAPI""/>
- <listOptionValue builtIn="false" value="C:\Program Files\Microsoft SDKs\Windows\v7.0A\Include"/>
+ <listOptionValue builtIn="false" value=""C:\Program Files\Microsoft SDKs\Windows\v7.0A\Include""/>
</option>
<option id="org.eclipse.cdt.msvc.cl.option.macros.1240665997" name="Defines (/D)" superClass="org.eclipse.cdt.msvc.cl.option.macros" valueType="definedSymbols">
<listOptionValue builtIn="false" value="DEBUG"/>
@@ -43,7 +43,7 @@ </option>
<inputType id="org.eclipse.cdt.msvc.cl.inputType.1397372383" superClass="org.eclipse.cdt.msvc.cl.inputType"/>
</tool>
- <tool id="org.eclipse.cdt.msvc.rc.dll.debug.471866324" name="Resource Compiler (rc)" superClass="org.eclipse.cdt.msvc.rc.dll.debug">
+ <tool command="rc /nologo" id="org.eclipse.cdt.msvc.rc.dll.debug.471866324" name="Resource Compiler (rc)" superClass="org.eclipse.cdt.msvc.rc.dll.debug">
<option id="org.eclipse.cdt.msvc.rc.option.includes.392868353" name="Include Path (/I)" superClass="org.eclipse.cdt.msvc.rc.option.includes" valueType="includePath">
<listOptionValue builtIn="false" value=""..\..\..\Include""/>
</option>
@@ -87,27 +87,27 @@ </externalSettings>
<extensions>
<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
- <extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <configuration artifactExtension="dll" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" description="" id="org.eclipse.cdt.msvc.dll.release.461974886" name="Release" parent="org.eclipse.cdt.msvc.dll.release">
+ <configuration artifactExtension="dll" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" description="" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="org.eclipse.cdt.msvc.dll.release.461974886" name="Release" parent="org.eclipse.cdt.msvc.dll.release">
<folderInfo id="org.eclipse.cdt.msvc.dll.release.461974886." name="/" resourcePath="">
- <toolChain id="org.eclipse.cdt.msvc.toolchain.dll.release.752641338" name="Microsoft Visual C++" superClass="org.eclipse.cdt.msvc.toolchain.dll.release">
+ <toolChain errorParsers="" id="org.eclipse.cdt.msvc.toolchain.dll.release.752641338" name="Microsoft Visual C++" superClass="org.eclipse.cdt.msvc.toolchain.dll.release">
<targetPlatform id="org.eclipse.cdt.msvc.targetPlatform.dll.release.1259241292" superClass="org.eclipse.cdt.msvc.targetPlatform.dll.release"/>
- <builder buildPath="${workspace_loc:/TrafficCounter/Release}" id="org.eclipse.cdt.msvc.builder.947348140" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="org.eclipse.cdt.msvc.builder"/>
- <tool command="cl /c" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="org.eclipse.cdt.msvc.cl.c.dll.release.2005821470" name="C Compiler (cl)" superClass="org.eclipse.cdt.msvc.cl.c.dll.release">
+ <builder buildPath="${workspace_loc:/TrafficCounter/Release}" errorParsers="" id="org.eclipse.cdt.msvc.builder.947348140" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="org.eclipse.cdt.msvc.builder"/>
+ <tool command="cl /c" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="" id="org.eclipse.cdt.msvc.cl.c.dll.release.2005821470" name="C Compiler (cl)" superClass="org.eclipse.cdt.msvc.cl.c.dll.release">
<option id="org.eclipse.cdt.msvc.cl.option.optimization.570342597" name="Optimization" superClass="org.eclipse.cdt.msvc.cl.option.optimization"/>
<option id="org.eclipse.cdt.msvc.cl.option.debugFormat.252591772" name="Debug Information Format" superClass="org.eclipse.cdt.msvc.cl.option.debugFormat"/>
<inputType id="org.eclipse.cdt.msvc.cl.inputType.c.797404818" superClass="org.eclipse.cdt.msvc.cl.inputType.c"/>
</tool>
- <tool id="org.eclipse.cdt.msvc.cl.dll.release.503753211" name="C++ Compiler (cl)" superClass="org.eclipse.cdt.msvc.cl.dll.release">
+ <tool errorParsers="" id="org.eclipse.cdt.msvc.cl.dll.release.503753211" name="C++ Compiler (cl)" superClass="org.eclipse.cdt.msvc.cl.dll.release">
<option id="org.eclipse.cdt.msvc.cl.option.optimization.905639963" name="Optimization" superClass="org.eclipse.cdt.msvc.cl.option.optimization"/>
<option id="org.eclipse.cdt.msvc.cl.option.debugFormat.992091112" name="Debug Information Format" superClass="org.eclipse.cdt.msvc.cl.option.debugFormat"/>
<option id="org.eclipse.cdt.msvc.cl.option.includes.2040009850" name="Include Path (/I)" superClass="org.eclipse.cdt.msvc.cl.option.includes" valueType="includePath">
<listOptionValue builtIn="false" value=""..\..\..\Include""/>
<listOptionValue builtIn="false" value=""..\..\ExternalAPI""/>
- <listOptionValue builtIn="false" value="C:\Program Files\Microsoft SDKs\Windows\v7.0A\Include"/>
+ <listOptionValue builtIn="false" value=""C:\Program Files\Microsoft SDKs\Windows\v7.0A\Include""/>
</option>
<option id="org.eclipse.cdt.msvc.cl.option.macros.865983604" name="Defines (/D)" superClass="org.eclipse.cdt.msvc.cl.option.macros" valueType="definedSymbols">
<listOptionValue builtIn="false" value="NDEBUG"/>
@@ -116,13 +116,13 @@ </option>
<inputType id="org.eclipse.cdt.msvc.cl.inputType.1870081348" superClass="org.eclipse.cdt.msvc.cl.inputType"/>
</tool>
- <tool id="org.eclipse.cdt.msvc.rc.dll.release.426267774" name="Resource Compiler (rc)" superClass="org.eclipse.cdt.msvc.rc.dll.release">
+ <tool errorParsers="" id="org.eclipse.cdt.msvc.rc.dll.release.426267774" name="Resource Compiler (rc)" superClass="org.eclipse.cdt.msvc.rc.dll.release">
<option id="org.eclipse.cdt.msvc.rc.option.includes.686044655" name="Include Path (/I)" superClass="org.eclipse.cdt.msvc.rc.option.includes" valueType="includePath">
<listOptionValue builtIn="false" value=""..\..\..\Include""/>
</option>
<inputType id="org.eclipse.cdt.msvc.rc.inputType.210914062" superClass="org.eclipse.cdt.msvc.rc.inputType"/>
</tool>
- <tool id="org.eclipse.cdt.msvc.link.dll.release.1456328195" name="Linker (link)" superClass="org.eclipse.cdt.msvc.link.dll.release">
+ <tool errorParsers="" id="org.eclipse.cdt.msvc.link.dll.release.1456328195" name="Linker (link)" superClass="org.eclipse.cdt.msvc.link.dll.release">
<option defaultValue="true" id="org.eclipse.cdt.msvc.link.option.dll.1503109199" name="Build a DLL" superClass="org.eclipse.cdt.msvc.link.option.dll" valueType="boolean"/>
<option id="org.eclipse.cdt.msvc.link.option.others.1793370056" name="Other Options" superClass="org.eclipse.cdt.msvc.link.option.others" valueType="stringList">
<listOptionValue builtIn="false" value="/MACHINE:X86"/>
@@ -161,7 +161,14 @@ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.msw.build.clScannerInfo"/>
</scannerConfigBuildInfo>
</storageModule>
- <storageModule moduleId="refreshScope"/>
+ <storageModule moduleId="refreshScope" versionNumber="2">
+ <configuration configurationName="Release">
+ <resource resourceType="PROJECT" workspacePath="/TrafficCounter"/>
+ </configuration>
+ <configuration configurationName="Debug">
+ <resource resourceType="PROJECT" workspacePath="/TrafficCounter"/>
+ </configuration>
+ </storageModule>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
</cproject>
diff --git a/plugins/TrafficCounter/makefile_gcc b/plugins/TrafficCounter/makefile_gcc new file mode 100644 index 0000000000..5baf60ce0e --- /dev/null +++ b/plugins/TrafficCounter/makefile_gcc @@ -0,0 +1,78 @@ +ifndef CFG
+ $(error Specify configuration: CFG=Release|Debug)
+endif
+
+COMPILER_OPTS = -c -Wall -fmessage-length=0 -fpermissive -fno-exceptions \
+ -DUNICODE -D_UNICODE
+INCLUDE_PATH = -I../../Include -I../../Include/msapi -I../ExternalAPI
+LINKER_OPTS = -nostartfiles -nodefaultlibs -nostdlib -shared -Wl,-Map,$(OUTDIR)/$(PROJECT_NAME).map -Wl,-e,_DllMain@12
+LIBRARIES = -lgcc -lmsvcrt -lkernel32 -lshell32 -luser32 -lcomctl32 -lgdi32 -lmsimg32 -loleaut32 $(FINDIR)/lib/mir_core.lib
+
+ifeq ($(CFG), Release)
+ COMPILER_OPTS += -O2 -Os -DNDEBUG
+ LINKER_OPTS += -s
+else
+ ifeq ($(CFG), Debug)
+ COMPILER_OPTS += -O0 -g3 -D_DEBUG
+ else
+ $(error Invalid configuration specfied: $(CFG))
+ endif
+endif
+
+PROJECT_NAME = TrafficCounter
+SRCDIR = src
+OUTDIR = $(CFG)
+FINDIR = ../../bin
+OUTNAME = $(FINDIR)/$(CFG)/Plugins/$(PROJECT_NAME).dll
+
+COMPILER = gcc
+LINKER = gcc
+RSC = windres
+
+SRCS = $(SRCDIR)/TrafficCounter.cpp \
+ $(SRCDIR)/misc.cpp \
+ $(SRCDIR)/options.cpp \
+ $(SRCDIR)/opttree.cpp \
+ $(SRCDIR)/statistics.cpp \
+ $(SRCDIR)/vars.cpp
+
+OBJECTS = $(OUTDIR)/TrafficCounter.obj \
+ $(OUTDIR)/misc.obj \
+ $(OUTDIR)/options.obj \
+ $(OUTDIR)/opttree.obj \
+ $(OUTDIR)/statistics.obj \
+ $(OUTDIR)/vars.obj \
+ $(OUTDIR)/resource.res
+
+DEPFILE = $(OUTDIR)/$(PROJECT_NAME).dep
+
+ALL: $(OUTDIR) depfile
+ @$(MAKE) USE_DEPFILE=1 -f makefile_gcc build
+ @echo Done.
+
+$(OUTDIR):
+ @mkdir -pv $(OUTDIR)
+
+.PHONY: depfile
+depfile:
+ @echo Rebuilding dependencies...
+ $(COMPILER) -MM $(INCLUDE_PATH) $(SRCS) > $(DEPFILE)
+
+.PHONY: build
+build: $(OUTNAME)
+
+$(OUTNAME): $(OBJECTS)
+ @echo Building $(OUTNAME)...
+ @$(LINKER) $(LINKER_OPTS) $(LIBRARIES_PATH) -o $(OUTNAME) $(OBJECTS) $(LIBRARIES)
+
+ifdef USE_DEPFILE
+ include $(DEPFILE)
+endif
+
+$(OUTDIR)/%.obj : $(SRCDIR)/%.cpp
+ @echo Compliling $<
+ @$(COMPILER) $(INCLUDE_PATH) -o $@ $(COMPILER_OPTS) $<
+
+$(OUTDIR)/%.res : res/%.rc
+ @echo Compiling resources...
+ @$(RSC) $(INCLUDE_PATH) -i $< -o $@ -J RC -O COFF -c 0x4E3
diff --git a/plugins/TrafficCounter/res/resource.rc b/plugins/TrafficCounter/res/resource.rc index c14b8a8aaa..7dff79bb8a 100644 --- a/plugins/TrafficCounter/res/resource.rc +++ b/plugins/TrafficCounter/res/resource.rc @@ -20,6 +20,10 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#pragma code_page(1251)
+#ifdef __GNUC__
+#include "version.rc"
+#endif
+
/////////////////////////////////////////////////////////////////////////////
//
// Icon
|