Fix EDKT140(CompressDll.dll does not build under cygwin gcc).
authorqouyang <qouyang@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 4 Aug 2006 03:17:05 +0000 (03:17 +0000)
committerqouyang <qouyang@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 4 Aug 2006 03:17:05 +0000 (03:17 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1188 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/TianoTools/CompressDll/CompressDll.c
Tools/Source/TianoTools/CompressDll/CompressDll.h
Tools/Source/TianoTools/CompressDll/build.xml
Tools/Source/TianoTools/Pccts/antlr/makefile.cygwin
Tools/Source/TianoTools/Pccts/dlg/makefile.cygwin
Tools/Source/TianoTools/build.xml
edksetup.sh

index 3c6fc8c..cc06f26 100644 (file)
@@ -11,6 +11,9 @@
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
+#if defined(__GNUC__)\r
+typedef long long __int64;/*For cygwin build*/\r
+#endif\r
 #include "CompressDll.h"\r
 #include "EfiCompress.h"\r
 \r
index 3b0fbb2..fa3b83c 100644 (file)
@@ -1,4 +1,5 @@
 /* DO NOT EDIT THIS FILE - it is machine generated */\r
+\r
 #include <jni.h>\r
 /* Header for class org_tianocore_frameworktasks_Compress */\r
 \r
index ff80a6c..1aa5fb6 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
+<?xml version="1.0" encoding="UTF-8"?>\r
 <!--\r
 Copyright (c) 2006, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
@@ -49,10 +49,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
       <includepath path="${env.JAVA_HOME}/include"/>\r
-      <includepath path="${env.JAVA_HOME}/include/linux" if="cyglinux"/>\r
+      <includepath path="${env.JAVA_HOME}/include/linux" if="gcc"/>\r
+      <includepath path="${env.JAVA_HOME}/include/win32" if="cygwin"/>\r
       <includepath path="${env.JAVA_HOME}/include/win32" if="msft"/>\r
       <libset dir="${LIB_DIR}" libs="CommonTools"/>\r
       <syslibset libs="kernel32" if="msft"/>\r
+      <linkerarg value="-mno-cygwin" if="cygwin"/>\r
+      <linkerarg value="--add-stdcall-alias" if="cygwin"/>\r
     </cc>\r
     <copy file="${result}" tofile="${BIN_DIR}/CompressDll.dll"/>\r
     <chmod file="${BIN_DIR}/CompressDll.dll" perm="ugo+x"/>\r
index cc590e4..956de0b 100644 (file)
@@ -167,7 +167,7 @@ PCCTS_H=../h
 BIN_DIR=../../../../bin\r
 CC=gcc\r
 COPT=-O\r
-ANTLR=${BIN_DIR}/antlr.exe\r
+ANTLR=$(BIN_DIR)/antlr.exe\r
 DLG=${BIN_DIR}/dlg.exe\r
 OBJ_EXT=o\r
 OUT_OBJ = -o\r
@@ -180,7 +180,7 @@ OBJ=antlr.o scan.o err.o bits.o build.o fset2.o fset.o gen.o  \
         globals.o hash.o lex.o main.o misc.o set.o pred.o egman.o mrhoist.o fcache.o\r
 \r
 antlr : $(OBJ) $(SRC)\r
-               $(CC) $(CFLAGS) -o ${BIN_DIR}/antlr.exe $(OBJ)\r
+               $(CC) $(CFLAGS) -o $(BIN_DIR)/antlr.exe $(OBJ)\r
 \r
 # what files does PCCTS generate (both ANTLR and DLG)\r
 PCCTS_GEN=antlr.c scan.c err.c tokens.h mode.h parser.dlg stdpccts.h remap.h\r
index 02e4c89..bbba820 100644 (file)
@@ -117,7 +117,7 @@ PCCTS_H=../h
 BIN_DIR=../../../../bin\r
 CC=cc\r
 COPT=-O\r
-ANTLR=${BIN_DIR}/antlr.exe\r
+ANTLR=$(BIN_DIR)/antlr.exe\r
 DLG=${BIN_DIR}/dlg.exe\r
 CFLAGS= $(COPT) -I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN -DZZLEXBUFSIZE=65536\r
 OBJ_EXT=o\r
@@ -126,7 +126,7 @@ OBJ = dlg_p.o dlg_a.o main.o err.o set.o support.o output.o \
         relabel.o automata.o\r
 \r
 dlg : $(OBJ) $(SRC)\r
-               $(CC) $(CFLAGS) -o ${BIN_DIR}/dlg.exe $(OBJ)\r
+               $(CC) $(CFLAGS) -o $(BIN_DIR)/dlg.exe $(OBJ)\r
 \r
 SRC = dlg_p.c dlg_a.c main.c err.c $(SET)/set.c support.c output.c \\r
         relabel.c automata.c\r
index d304f0a..d172292 100644 (file)
@@ -158,7 +158,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
     <condition property="cyglinux">\r
       <or>\r
-        <istrue value="linux"/>\r
+        <istrue value="${linux}"/>\r
         <istrue value="${cygwin}"/>\r
       </or>\r
     </condition>\r
index 08e62bc..7a3fe33 100644 (file)
@@ -28,10 +28,22 @@ if [ "$XMLBEANS_HOME" == "" ]
 then
   echo "Please set XMLBEANS_HOME before sourcing this script."
 else
+  
+case "`uname`" in
+  CYGWIN*) 
+    # Convert paths to unix format.
+    # This is to remove possible wrong path when converting CLASSPATH back to windows format
+    export WORKSPACE=`cygpath -u $WORKSPACE`
+    export ANT_HOME=`cygpath -u $ANT_HOME`
+    export XMLBEANS_HOME=`cygpath -u $XMLBEANS_HOME`
+    export FRAMEWORK_TOOLS_PATH=`cygpath -u $FRAMEWORK_TOOLS_PATH`
+    ;;
+esac
 
 # These should be ok as they are.
 export CLASSPATH=$WORKSPACE/Tools/Jars/SurfaceArea.jar:$WORKSPACE/Tools/Jars/frameworktasks.jar:$WORKSPACE/Tools/Jars/cpptasks.jar:$WORKSPACE/Tools/Jars/PcdTools.jar:$WORKSPACE/Tools/Jars/GenBuild.jar:$XMLBEANS_HOME/lib/resolver.jar:$XMLBEANS_HOME/lib/xbean.jar:$XMLBEANS_HOME/lib/xmlpublic.jar:$XMLBEANS_HOME/lib/jsr173_1.0_api.jar:$XMLBEANS_HOME/lib/saxon8.jar:$XMLBEANS_HOME/lib/xbean_xpath.jar
 export CLASSPATH=$CLASSPATH:$WORKSPACE/Tools/Jars/Common.jar
+export CLASSPATH=$CLASSPATH:$WORKSPACE/Tools/Jars/PcdTools.jar
 export CLASSPATH=$CLASSPATH:$WORKSPACE/Tools/Bin/FrameworkWizard.jar
 export FRAMEWORK_TOOLS_PATH=$WORKSPACE/Tools/bin
 export PATH=$FRAMEWORK_TOOLS_PATH:$ANT_HOME/bin:$JAVA_HOME/bin:$PATH
@@ -45,6 +57,8 @@ case "`uname`" in
   CYGWIN*) 
     # Convert paths to windows format.
     export WORKSPACE=`cygpath -w $WORKSPACE`
+    export ANT_HOME=`cygpath -w -p $ANT_HOME`
+    export XMLBEANS_HOME=`cygpath -w -p $XMLBEANS_HOME`
     export CLASSPATH=`cygpath -w -p $CLASSPATH`
     export FRAMEWORK_TOOLS_PATH=`cygpath -w -p $FRAMEWORK_TOOLS_PATH`
     ;;