Skip to content

Commit

Permalink
OS/2 port - support building dmake with klibc. By Yuri Dario.
Browse files Browse the repository at this point in the history
  • Loading branch information
pgiffuni authored and mohawk2 committed Aug 28, 2014
1 parent 5b80d6d commit 915ce1b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 16 deletions.
2 changes: 1 addition & 1 deletion imacs.c
Expand Up @@ -68,7 +68,7 @@ Create_macro_vars()
else
#if (_MPW)
DirSepStr = ":";
#elif defined( __EMX__)
#elif defined( __EMX__BACKSLASH)
/* Use '\' for OS/2 port. */
DirSepStr = "\\";
#else
Expand Down
33 changes: 19 additions & 14 deletions make.cmd
@@ -1,17 +1,5 @@
echo off

REM * This script is deprecated for OS/2 libc 06x building! Use the configure
REM * mechanism. Run the following commands your OS/2 shell:
REM *
REM * set CFLAGS=-g -Zomf -O3 -march=pentium -mcpu=pentium4
REM * set CXXFLAGS=-g -Zomf -O3 -march=pentium -mcpu=pentium4
REM * set LDFLAGS=-s -Zsym -Zmap -Zhigh-mem -Zomf -Zexe -Zargs-wild -Zargs-resp
REM * set LN_CP_F=cp.exe
REM * set RANLIb=echo
REM * set AR=emxomfar -p128
REM * sh -c "./configure --enable-spawn"
REM * make.exe

cls
rem *** This is the make command file that is used under OS/2 to make the
rem *** first version of dmake. It isn't pretty but it does work, assuming
Expand All @@ -20,6 +8,7 @@ rem

if %0%1 == %0 goto error

if %1 == os2-gcc goto mkgcc
if %1 == os2-ibm goto mkibm
if %1 == os2-ibm3 goto mkibm3
if %1 == winnt-bcc40 goto mkwntb40
Expand All @@ -32,14 +21,30 @@ rem label the possible DOS variations for dmake here.
:error
echo OS/2 INDEX: You must specify one of:
echo ------------------
echo os2-ibm - IBM OS/2 ICC compile.
echo os2-ibm3 - IBM OS/2 ICC3 compile.
echo os2-gcc - gcc&klibc compile (this is the only supported configuration).
echo os2-ibm - IBM OS/2 ICC compile (deprecated).
echo os2-ibm3 - IBM OS/2 ICC3 compile (deprecated).
echo winnt-bcc40 - Windows-NT Borland C++ 4.0 Compile
echo winnt-bcc45 - Windows-NT Borland C++ 4.5 Compile
echo winnt-bcc50 - Windows-NT Borland C++ 5.0 Compile
echo winnt-vpp40 - Windows-NT Microsoft VC++ 4.0 Compile
goto end

rem This is the script that builds OS/2 dmake using gcc & klibc

:mkgcc
set CONFIG_SHELL=sh
set CFLAGS=-g -O3 -march=pentium4
set CXXFLAGS=-g -O3 -march=pentium4
set LDFLAGS=-s -Zomf -Zhigh-mem -Zargs-wild -Zargs-resp
set LN_CP_F=cp.exe
set RANLIB=echo
set AR=emxomfar -p128
sh -c "./configure --enable-spawn"
make.exe

goto end

rem This is the script that bilds OS/2 dmake using IBM ICC Compiler
:mkibm
os2\ibm\icc\mk.cmd
Expand Down
2 changes: 1 addition & 1 deletion sysintf.c
Expand Up @@ -597,7 +597,7 @@ Get_current_dir()
if( !getcwd(buf, sizeof(buf)) )
Fatal("Internal Error: Error when calling getcwd()!");

#ifdef __EMX__
#ifdef __EMX__BACKSLASH
char *slash;
slash = buf;
while( (slash=strchr(slash,'/')) )
Expand Down

0 comments on commit 915ce1b

Please sign in to comment.