OSDN Git Service

Linux用ビルド設定
authoryukihane <yukihane.feather@gmail.com>
Wed, 21 Sep 2011 08:38:15 +0000 (17:38 +0900)
committeryukihane <yukihane.feather@gmail.com>
Wed, 21 Sep 2011 17:25:55 +0000 (02:25 +0900)
vhook/.dep.inc [new file with mode: 0644]
vhook/nbproject/Makefile-LinuxReleaseOnLinux.mk [moved from vhook/nbproject/Makefile-Release.mk with 62% similarity]
vhook/nbproject/Makefile-impl.mk
vhook/nbproject/Makefile-variables.mk
vhook/nbproject/Package-LinuxReleaseOnLinux.bash [moved from vhook/nbproject/Package-Release.bash with 76% similarity]
vhook/nbproject/configurations.xml

diff --git a/vhook/.dep.inc b/vhook/.dep.inc
new file mode 100644 (file)
index 0000000..4560e55
--- /dev/null
@@ -0,0 +1,5 @@
+# This code depends on make tool being used
+DEPFILES=$(wildcard $(addsuffix .d, ${OBJECTFILES}))
+ifneq (${DEPFILES},)
+include ${DEPFILES}
+endif
similarity index 62%
rename from vhook/nbproject/Makefile-Release.mk
rename to vhook/nbproject/Makefile-LinuxReleaseOnLinux.mk
index e9ec5e7..a9db3fe 100644 (file)
@@ -12,15 +12,15 @@ MKDIR=mkdir
 CP=cp
 CCADMIN=CCadmin
 RANLIB=ranlib
-CC=gcc-sjlj.exe
-CCC=g++.exe
-CXX=g++.exe
+CC=gcc
+CCC=
+CXX=
 FC=
-AS=as.exe
+AS=as
 
 # Macros
-CND_PLATFORM=MinGW_sjlj-Windows
-CND_CONF=Release
+CND_PLATFORM=GNU-Linux-x86
+CND_CONF=LinuxReleaseOnLinux
 CND_DISTDIR=dist
 
 # Include project Makefile
@@ -56,73 +56,73 @@ FFLAGS=
 ASFLAGS=
 
 # Link Libraries and Options
-LDLIBSOPTIONS=-lSDL_gfx -lSDLmain -lSDL.dll -lSDL_ttf
+LDLIBSOPTIONS=-L/home/yuki/fflibs/lib -lSDL_gfx -lSDLmain -lSDL -lSDL_ttf
 
 # Build Targets
 .build-conf: ${BUILD_SUBPROJECTS}
-       ${MAKE}  -f nbproject/Makefile-Release.mk dist/Release/MinGW_sjlj-Windows/nicovideo.dll
+       ${MAKE}  -f nbproject/Makefile-LinuxReleaseOnLinux.mk dist/Release/GNU-Linux-x86/libnicovideo.so.1.0.0
 
-dist/Release/MinGW_sjlj-Windows/nicovideo.dll: ${OBJECTFILES}
-       ${MKDIR} -p dist/Release/MinGW_sjlj-Windows
-       ${LINK.c} -shared -o dist/Release/${CND_PLATFORM}/nicovideo.dll ${OBJECTFILES} ${LDLIBSOPTIONS} 
+dist/Release/GNU-Linux-x86/libnicovideo.so.1.0.0: ${OBJECTFILES}
+       ${MKDIR} -p dist/Release/GNU-Linux-x86
+       ${LINK.c} -shared -o dist/Release/${CND_PLATFORM}/libnicovideo.so.1.0.0 -s -fPIC ${OBJECTFILES} ${LDLIBSOPTIONS} 
 
 ${OBJECTDIR}/comment/com_surface.o: nbproject/Makefile-${CND_CONF}.mk comment/com_surface.c 
        ${MKDIR} -p ${OBJECTDIR}/comment
        ${RM} $@.d
-       $(COMPILE.c) -O3 -MMD -MP -MF $@.d -o ${OBJECTDIR}/comment/com_surface.o comment/com_surface.c
+       $(COMPILE.c) -O3 -s -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/comment/com_surface.o comment/com_surface.c
 
 ${OBJECTDIR}/chat/process_chat.o: nbproject/Makefile-${CND_CONF}.mk chat/process_chat.c 
        ${MKDIR} -p ${OBJECTDIR}/chat
        ${RM} $@.d
-       $(COMPILE.c) -O3 -MMD -MP -MF $@.d -o ${OBJECTDIR}/chat/process_chat.o chat/process_chat.c
+       $(COMPILE.c) -O3 -s -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/chat/process_chat.o chat/process_chat.c
 
 ${OBJECTDIR}/main.o: nbproject/Makefile-${CND_CONF}.mk main.c 
        ${MKDIR} -p ${OBJECTDIR}
        ${RM} $@.d
-       $(COMPILE.c) -O3 -MMD -MP -MF $@.d -o ${OBJECTDIR}/main.o main.c
+       $(COMPILE.c) -O3 -s -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/main.o main.c
 
 ${OBJECTDIR}/framehook.o: nbproject/Makefile-${CND_CONF}.mk framehook.c 
        ${MKDIR} -p ${OBJECTDIR}
        ${RM} $@.d
-       $(COMPILE.c) -O3 -MMD -MP -MF $@.d -o ${OBJECTDIR}/framehook.o framehook.c
+       $(COMPILE.c) -O3 -s -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/framehook.o framehook.c
 
 ${OBJECTDIR}/comment/surf_util.o: nbproject/Makefile-${CND_CONF}.mk comment/surf_util.c 
        ${MKDIR} -p ${OBJECTDIR}/comment
        ${RM} $@.d
-       $(COMPILE.c) -O3 -MMD -MP -MF $@.d -o ${OBJECTDIR}/comment/surf_util.o comment/surf_util.c
+       $(COMPILE.c) -O3 -s -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/comment/surf_util.o comment/surf_util.c
 
 ${OBJECTDIR}/chat/chat.o: nbproject/Makefile-${CND_CONF}.mk chat/chat.c 
        ${MKDIR} -p ${OBJECTDIR}/chat
        ${RM} $@.d
-       $(COMPILE.c) -O3 -MMD -MP -MF $@.d -o ${OBJECTDIR}/chat/chat.o chat/chat.c
+       $(COMPILE.c) -O3 -s -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/chat/chat.o chat/chat.c
 
 ${OBJECTDIR}/comment/shadow.o: nbproject/Makefile-${CND_CONF}.mk comment/shadow.c 
        ${MKDIR} -p ${OBJECTDIR}/comment
        ${RM} $@.d
-       $(COMPILE.c) -O3 -MMD -MP -MF $@.d -o ${OBJECTDIR}/comment/shadow.o comment/shadow.c
+       $(COMPILE.c) -O3 -s -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/comment/shadow.o comment/shadow.c
 
 ${OBJECTDIR}/chat/chat_slot.o: nbproject/Makefile-${CND_CONF}.mk chat/chat_slot.c 
        ${MKDIR} -p ${OBJECTDIR}/chat
        ${RM} $@.d
-       $(COMPILE.c) -O3 -MMD -MP -MF $@.d -o ${OBJECTDIR}/chat/chat_slot.o chat/chat_slot.c
+       $(COMPILE.c) -O3 -s -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/chat/chat_slot.o chat/chat_slot.c
 
 ${OBJECTDIR}/process.o: nbproject/Makefile-${CND_CONF}.mk process.c 
        ${MKDIR} -p ${OBJECTDIR}
        ${RM} $@.d
-       $(COMPILE.c) -O3 -MMD -MP -MF $@.d -o ${OBJECTDIR}/process.o process.c
+       $(COMPILE.c) -O3 -s -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/process.o process.c
 
 ${OBJECTDIR}/util.o: nbproject/Makefile-${CND_CONF}.mk util.c 
        ${MKDIR} -p ${OBJECTDIR}
        ${RM} $@.d
-       $(COMPILE.c) -O3 -MMD -MP -MF $@.d -o ${OBJECTDIR}/util.o util.c
+       $(COMPILE.c) -O3 -s -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/util.o util.c
 
 # Subprojects
 .build-subprojects:
 
 # Clean Targets
 .clean-conf: ${CLEAN_SUBPROJECTS}
-       ${RM} -r build/Release
-       ${RM} dist/Release/MinGW_sjlj-Windows/nicovideo.dll
+       ${RM} -r build/LinuxReleaseOnLinux
+       ${RM} dist/Release/GNU-Linux-x86/libnicovideo.so.1.0.0
 
 # Subprojects
 .clean-subprojects:
index 931d1e6..ad8ff10 100644 (file)
@@ -31,7 +31,7 @@ DEFAULTCONF=Debug
 CONF=${DEFAULTCONF}
 
 # All Configurations
-ALLCONFS=Debug Release LinuxMingw 
+ALLCONFS=Debug LinuxReleaseOnLinux LinuxMingw 
 
 
 # build
index 57296a4..8810dc1 100644 (file)
@@ -14,14 +14,14 @@ CND_ARTIFACT_PATH_Debug=dist/Debug//nicovideodbg.dll
 CND_PACKAGE_DIR_Debug=dist/Debug//package
 CND_PACKAGE_NAME_Debug=libvhook.dll.tar
 CND_PACKAGE_PATH_Debug=dist/Debug//package/libvhook.dll.tar
-# Release configuration
-CND_PLATFORM_Release=
-CND_ARTIFACT_DIR_Release=dist/Release/
-CND_ARTIFACT_NAME_Release=nicovideo.dll
-CND_ARTIFACT_PATH_Release=dist/Release//nicovideo.dll
-CND_PACKAGE_DIR_Release=dist/Release//package
-CND_PACKAGE_NAME_Release=libvhook.dll.tar
-CND_PACKAGE_PATH_Release=dist/Release//package/libvhook.dll.tar
+# LinuxReleaseOnLinux configuration
+CND_PLATFORM_LinuxReleaseOnLinux=GNU-Linux-x86
+CND_ARTIFACT_DIR_LinuxReleaseOnLinux=dist/Release/GNU-Linux-x86
+CND_ARTIFACT_NAME_LinuxReleaseOnLinux=libnicovideo.so.1.0.0
+CND_ARTIFACT_PATH_LinuxReleaseOnLinux=dist/Release/GNU-Linux-x86/libnicovideo.so.1.0.0
+CND_PACKAGE_DIR_LinuxReleaseOnLinux=dist/LinuxReleaseOnLinux/GNU-Linux-x86/package
+CND_PACKAGE_NAME_LinuxReleaseOnLinux=libvhook.so.tar
+CND_PACKAGE_PATH_LinuxReleaseOnLinux=dist/LinuxReleaseOnLinux/GNU-Linux-x86/package/libvhook.so.tar
 # LinuxMingw configuration
 CND_PLATFORM_LinuxMingw=Linx_Mingw-Linux-x86
 CND_ARTIFACT_DIR_LinuxMingw=dist/LinuxMingw/Linx_Mingw-Linux-x86
similarity index 76%
rename from vhook/nbproject/Package-Release.bash
rename to vhook/nbproject/Package-LinuxReleaseOnLinux.bash
index a0b08d3..e980018 100644 (file)
@@ -6,14 +6,14 @@
 
 # Macros
 TOP=`pwd`
-CND_PLATFORM=MinGW_sjlj-Windows
-CND_CONF=Release
+CND_PLATFORM=GNU-Linux-x86
+CND_CONF=LinuxReleaseOnLinux
 CND_DISTDIR=dist
 TMPDIR=build/${CND_CONF}/${CND_PLATFORM}/tmp-packaging
 TMPDIRNAME=tmp-packaging
-OUTPUT_PATH=dist/Release/${CND_PLATFORM}/nicovideo.dll
-OUTPUT_BASENAME=nicovideo.dll
-PACKAGE_TOP_DIR=libsaccubusvhook.dll/
+OUTPUT_PATH=dist/Release/${CND_PLATFORM}/libnicovideo.so.1.0.0
+OUTPUT_BASENAME=libnicovideo.so.1.0.0
+PACKAGE_TOP_DIR=libvhook.so/
 
 # Functions
 function checkReturnCode
@@ -58,15 +58,15 @@ mkdir -p ${TMPDIR}
 
 # Copy files and create directories and links
 cd "${TOP}"
-makeDirectory ${TMPDIR}/libsaccubusvhook.dll/lib
+makeDirectory ${TMPDIR}/libvhook.so/lib
 copyFileToTmpDir "${OUTPUT_PATH}" "${TMPDIR}/${PACKAGE_TOP_DIR}lib/${OUTPUT_BASENAME}" 0644
 
 
 # Generate tar file
 cd "${TOP}"
-rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/libsaccubusvhook.dll.tar
+rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/libvhook.so.tar
 cd ${TMPDIR}
-tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/libsaccubusvhook.dll.tar *
+tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/libvhook.so.tar *
 checkReturnCode
 
 # Cleanup
index 9b81cf8..9ea6375 100644 (file)
         </linkerTool>
       </compileType>
     </conf>
-    <conf name="Release" type="2">
+    <conf name="LinuxReleaseOnLinux" type="2">
       <toolsSet>
         <developmentServer>localhost</developmentServer>
-        <compilerSet>MinGW_sjlj|MinGW</compilerSet>
-        <platform>3</platform>
+        <compilerSet>GNU|GNU</compilerSet>
+        <platform>2</platform>
       </toolsSet>
       <compileType>
         <cTool>
           <developmentMode>6</developmentMode>
+          <stripSymbols>true</stripSymbols>
         </cTool>
         <ccTool>
           <developmentMode>5</developmentMode>
           <developmentMode>5</developmentMode>
         </fortranCompilerTool>
         <linkerTool>
-          <output>dist/Release/${CND_PLATFORM}/nicovideo.dll</output>
-          <linkerKpic>false</linkerKpic>
+          <output>dist/Release/${CND_PLATFORM}/libnicovideo.so.1.0.0</output>
+          <linkerAddLib>
+            <pElem>/home/yuki/fflibs/lib</pElem>
+          </linkerAddLib>
+          <stripSymbols>true</stripSymbols>
           <linkerLibItems>
             <linkerLibLibItem>SDL_gfx</linkerLibLibItem>
             <linkerLibLibItem>SDLmain</linkerLibLibItem>
-            <linkerLibLibItem>SDL.dll</linkerLibLibItem>
+            <linkerLibLibItem>SDL</linkerLibLibItem>
             <linkerLibLibItem>SDL_ttf</linkerLibLibItem>
           </linkerLibItems>
         </linkerTool>