diff options
Diffstat (limited to 'translate/mcode')
-rwxr-xr-x | translate/mcode/dist.sh | 8 | ||||
-rw-r--r-- | translate/mcode/winbuild.bat | 4 | ||||
-rw-r--r-- | translate/mcode/windows/compile.bat | 23 | ||||
-rw-r--r-- | translate/mcode/windows/complib.bat | 17 | ||||
-rw-r--r-- | translate/mcode/windows/ghdl.nsi | 16 |
5 files changed, 45 insertions, 23 deletions
diff --git a/translate/mcode/dist.sh b/translate/mcode/dist.sh index 18c09e9..cf24141 100755 --- a/translate/mcode/dist.sh +++ b/translate/mcode/dist.sh @@ -133,12 +133,15 @@ ortho_code-opts.adb ortho_code-opts.ads ortho_code-types.adb ortho_code-types.ads +ortho_code-sysdeps.adb +ortho_code-sysdeps.ads ortho_code-x86-emits.adb ortho_code-x86-emits.ads ortho_code-x86-insns.adb ortho_code-x86-insns.ads ortho_code-x86-abi.adb ortho_code-x86-abi.ads +ortho_code-x86-flags.ads ortho_code-x86.adb ortho_code-x86.ads ortho_code.ads @@ -158,6 +161,7 @@ ghdl.nsi windows_default_path.adb windows_default_path.ads ghdlfilter.adb +ortho_code-sysdeps.adb grt-modules.adb " @@ -206,7 +210,7 @@ done ln -sf $CWD/winbuild.bat $distdir/winbuild.bat -makeinfo --no-split -o $distdir/windows/ghdl.htm $CWD/../../doc/ghdl.texi +makeinfo --html --no-split -o $distdir/windows/ghdl.htm $CWD/../../doc/ghdl.texi } do_sources_dir () @@ -460,6 +464,8 @@ else do_Makefile ;; files) do_files ;; + sources) + do_sources_dir ;; tar) do_tar ;; zip) diff --git a/translate/mcode/winbuild.bat b/translate/mcode/winbuild.bat index 7d5b942..ef16f1e 100644 --- a/translate/mcode/winbuild.bat +++ b/translate/mcode/winbuild.bat @@ -4,6 +4,10 @@ call windows\complib if errorlevel 1 goto end
"f:\Program Files\NSIS\makensis" windows\ghdl.nsi
if errorlevel 1 goto end
+
+gnatmake windows/ghdlversion -o windows/ghdlversion.exe
+windows\ghdlversion < ../../version.ads > windows/version.nsi
+
exit /b 0
:end
diff --git a/translate/mcode/windows/compile.bat b/translate/mcode/windows/compile.bat index fafbb25..be0aaec 100644 --- a/translate/mcode/windows/compile.bat +++ b/translate/mcode/windows/compile.bat @@ -2,12 +2,23 @@ mkdir build cd build
rem Do the compilation
-gcc -c -O ../grt/grt-cbinding.c
-gcc -c -O ../grt/grt-cvpi.c
-gcc -c -O ../grt/config/clock.c
-gcc -c -O ../ortho/memsegs_c.c
-gcc -c -O -DWITH_GNAT_RUN_TIME ../grt/config/win32.c
-gnatmake -O -gnatn -aI../windows -aI../ghdl -aI../ghdldrv -aI../grt -aI../ortho ghdl_mcode -o ghdl.exe -largs grt-cbinding.o clock.o grt-cvpi.o memsegs_c.o win32.o
+set CFLAGS=-O -g
+gcc -c %CFLAGS% ../../grt/grt-cbinding.c
+gcc -c %CFLAGS% ../../grt/grt-cvpi.c
+gcc -c %CFLAGS% ../../grt/config/clock.c
+gcc -c %CFLAGS% ../../../ortho/mcode/memsegs_c.c
+gcc -c %CFLAGS% -DWITH_GNAT_RUN_TIME ../../grt/config/win32.c
+gnatmake %CFLAGS% -gnatn -aI../windows -aI../../.. -aI../.. -aI../../ghdldrv -aI../../grt -aI../../../ortho/mcode ghdl_mcode -o ghdl.exe -largs grt-cbinding.o clock.o grt-cvpi.o memsegs_c.o win32.o -largs -Wl,--stack,8404992
+
+if errorlevel 1 goto failed
+
strip ghdl.exe
cd ..
+exit /b 0
+
+:failed
+echo "Compilation failed"
+cd ..
+exit /b 1
+
\ No newline at end of file diff --git a/translate/mcode/windows/complib.bat b/translate/mcode/windows/complib.bat index 04154e1..038a80e 100644 --- a/translate/mcode/windows/complib.bat +++ b/translate/mcode/windows/complib.bat @@ -5,6 +5,7 @@ gnatmake -aI..\windows ghdlfilter cd ..
set REL=..\..\..
+set LIBSRC=%REL%\..\..\libraries
set STD_SRCS=textio textio_body
set IEEE_SRCS=std_logic_1164 std_logic_1164_body numeric_std numeric_std-body numeric_bit numeric_bit-body
set VITAL95_SRCS=vital_timing vital_timing_body vital_primitives vital_primitives_body
@@ -20,22 +21,22 @@ cd v87 mkdir std
cd std
-for %%F in (%STD_SRCS%) do %REL%\build\ghdlfilter -v87 < %REL%\libraries\std\%%F.vhdl > %%F.v87 && %REL%\build\%GHDL% -a --std=87 --bootstrap --work=std %%F.v87
+for %%F in (%STD_SRCS%) do %REL%\build\ghdlfilter -v87 < %LIBSRC%\std\%%F.vhdl > %%F.v87 && %REL%\build\%GHDL% -a --std=87 --bootstrap --work=std %%F.v87
cd ..
mkdir ieee
cd ieee
rem Base ieee
-for %%F in (%IEEE_SRCS%) do %REL%\build\ghdlfilter -v87 < %REL%\libraries\ieee\%%F.vhdl > %%F.v87 && %REL%\build\%GHDL% -a --std=87 -P..\std --work=ieee %%F.v87
+for %%F in (%IEEE_SRCS%) do %REL%\build\ghdlfilter -v87 < %LIBSRC%\ieee\%%F.vhdl > %%F.v87 && %REL%\build\%GHDL% -a --std=87 -P..\std --work=ieee %%F.v87
rem Vital 95
-for %%F in (%VITAL95_SRCS%) do copy %REL%\libraries\vital95\%%F.vhdl %%F.vhd && %REL%\build\%GHDL% -a --std=87 -P..\std --work=ieee %%F.vhd
+for %%F in (%VITAL95_SRCS%) do copy %LIBSRC%\vital95\%%F.vhdl %%F.vhd && %REL%\build\%GHDL% -a --std=87 -P..\std --work=ieee %%F.vhd
cd ..
mkdir synopsys
cd synopsys
for %%F in (%IEEE_SRCS%) do %REL%\build\%GHDL% -a --std=87 -P..\std --work=ieee ..\ieee\%%F.v87
for %%F in (%VITAL95_SRCS%) do %REL%\build\%GHDL% -a --std=87 -P..\std --work=ieee ..\ieee\%%F.vhd
-for %%F in (%SYNOPSYS_SRCS%) do copy %REL%\libraries\synopsys\%%F.vhdl %%F.vhd && %REL%\build\%GHDL% -a --std=87 -P..\std --work=ieee %%F.vhd
+for %%F in (%SYNOPSYS_SRCS%) do copy %LIBSRC%\synopsys\%%F.vhdl %%F.vhd && %REL%\build\%GHDL% -a --std=87 -P..\std --work=ieee %%F.vhd
cd ..
cd ..
@@ -44,15 +45,15 @@ cd v93 mkdir std
cd std
-for %%F in (%STD_SRCS%) do %REL%\build\ghdlfilter -v93 < %REL%\libraries\std\%%F.vhdl > %%F.v93 && %REL%\build\%GHDL% -a --std=93 --bootstrap --work=std %%F.v93
+for %%F in (%STD_SRCS%) do %REL%\build\ghdlfilter -v93 < %LIBSRC%\std\%%F.vhdl > %%F.v93 && %REL%\build\%GHDL% -a --std=93 --bootstrap --work=std %%F.v93
cd ..
mkdir ieee
cd ieee
echo Base ieee
-for %%F in (%IEEE_SRCS%) do %REL%\build\ghdlfilter -v93 < %REL%\libraries\ieee\%%F.vhdl > %%F.v93 && %REL%\build\%GHDL% -a --std=93 -P..\std --work=ieee %%F.v93
-echo Vital 95
-for %%F in (%VITAL2000_SRCS%) do copy %REL%\libraries\vital2000\%%F.vhdl %%F.vhd && %REL%\build\%GHDL% -a --std=93 -P..\std --work=ieee %%F.vhd
+for %%F in (%IEEE_SRCS%) do %REL%\build\ghdlfilter -v93 < %LIBSRC%\ieee\%%F.vhdl > %%F.v93 && %REL%\build\%GHDL% -a --std=93 -P..\std --work=ieee %%F.v93
+echo Vital 2000 +for %%F in (%VITAL2000_SRCS%) do copy %LIBSRC%\vital2000\%%F.vhdl %%F.vhd && %REL%\build\%GHDL% -a --std=93 -P..\std --work=ieee %%F.vhd
cd ..
mkdir synopsys
diff --git a/translate/mcode/windows/ghdl.nsi b/translate/mcode/windows/ghdl.nsi index 4aeab9c..528a7df 100644 --- a/translate/mcode/windows/ghdl.nsi +++ b/translate/mcode/windows/ghdl.nsi @@ -5,9 +5,8 @@ ; Check if administrator
; uninstall support
; TODO:
-; * Add version
-; * Check if GHDL is already installed (and uninstall before)
-; * Doc
+; * allow multiple version
+; * command line installation
; * Allow user install
;--------------------------------
@@ -29,7 +28,7 @@ InstallDir $PROGRAMFILES\Ghdl ; overwrite the old one automatically)
InstallDirRegKey HKLM "Software\Ghdl" "Install_Dir"
-LicenseData ..\COPYING
+LicenseData ..\..\..\COPYING
; LicenseForceSelection
;--------------------------------
@@ -117,7 +116,7 @@ Section "Ghdl Compiler (required)" File /oname=ghdl.exe ..\build\ghdl.exe
SetOutPath $INSTDIR
- File /oname=COPYING.txt ..\COPYING
+ File /oname=COPYING.txt ..\..\..\COPYING
; Write the installation path into the registry
WriteRegStr HKLM "Software\Ghdl" "Install_Dir" $INSTDIR
@@ -141,18 +140,19 @@ Section "VHDL standard and ieee libraries" File /r ..\lib\v93\std ..\lib\v93\ieee
SectionEnd
-Section "Synopsys libraries (Recommanded)"
+Section "Synopsys libraries (Recommended)"
SetOutPath $INSTDIR\lib\v87
File /r ..\lib\v87\synopsys
SetOutPath $INSTDIR\lib\v93
File /r ..\lib\v93\synopsys
SectionEnd
-Section "Documentation (Recommanded)"
+Section "Documentation (Recommended)"
+ SetOutPath $INSTDIR
File ghdl.htm
SectionEnd
-Section "Add in PATH (Recommanded)"
+Section "Add in PATH (Recommended)"
WriteRegDWORD HKLM "Software\Ghdl" "PathSet" 1
Push $INSTDIR\Bin
Call AddToPath
|