mirror of
https://github.com/FDOS/kernel.git
synced 2025-04-08 17:15:17 +02:00
(Arkady) Remove -U option as Bart's new EXFLAT now uses XUPX variable directly
Suppress TC++ 1.01 warnings (BC++ 3/4/5 not affected!) and MSC LIB prompt git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/branches/UNSTABLE@1065 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
dc550c065a
commit
69df2d06f7
@ -66,6 +66,14 @@ static char *portab_hRcsId =
|
||||
#define I86
|
||||
#define CDECL cdecl
|
||||
#if __TURBOC__ > 0x202
|
||||
#if __TURBOC__ < 0x400 /* targeted to TC++ 1.0 which is 0x297 (3.1 is 0x410) */
|
||||
#pragma warn -pia /* possibly incorrect assignment */
|
||||
#pragma warn -sus /* suspicious pointer conversion */
|
||||
/*
|
||||
* NOTE: The above enable TC++ to build the kernel, but it's not recommended
|
||||
* for development. Use [Open]Watcom (the best!) or newer Borland compilers!
|
||||
*/
|
||||
#endif
|
||||
/* printf callers do the right thing for tc++ 1.01 but not tc 2.01 */
|
||||
#define VA_CDECL
|
||||
#else
|
||||
|
@ -31,7 +31,7 @@ all: ..\bin\$(TARGET).sys ..\bin\country.sys
|
||||
|
||||
..\bin\$(TARGET).sys: $(TARGET).lnk $(OBJS) $(LIBS) ..\utils\exeflat.exe
|
||||
$(LINK) @$(TARGET).lnk;
|
||||
..\utils\exeflat kernel.exe $*.sys $(LOADSEG) -S0x10 -S0x8B $(UPXOPT)
|
||||
..\utils\exeflat kernel.exe $*.sys $(LOADSEG) -S0x10 -S0x8B
|
||||
copy $*.sys ..\bin\kernel.sys
|
||||
|
||||
..\bin\country.sys: country.asm
|
||||
|
@ -12,9 +12,9 @@ all: libm.lib
|
||||
|
||||
libm.lib: $(CLIB) $(DEPENDS)
|
||||
-$(RM) $*.lib
|
||||
$(LIBUTIL) $(CLIB) $(MATH_EXTRACT) $(LIBTERM)
|
||||
$(LIBUTIL) $(CLIB) $(MATH_EXTRACT)$(LIBTERM)
|
||||
$(COMSPEC) /c for %i in (*.obj) do ..\utils\patchobj CODE=LCODE %i
|
||||
$(LIBUTIL) $* $(MATH_INSERT) $(LIBTERM)
|
||||
$(LIBUTIL) $* $(MATH_INSERT)$(LIBTERM)
|
||||
-$(RM) *.obj
|
||||
|
||||
########################################################################
|
||||
|
@ -32,19 +32,6 @@ INITPATCH=@rem
|
||||
LOADSEG=0x60
|
||||
!endif
|
||||
|
||||
UPXOPT=-U
|
||||
!if $(__MAKE__)0 == 0 # NMAKE/WMAKE
|
||||
!if "$(XUPX)" == "" # TC doesn't supports this
|
||||
XUPX=rem # NMAKE doesn't supports @ in macro
|
||||
UPXOPT=
|
||||
!endif
|
||||
!else # TC/BC MAKE
|
||||
!if !$d(XUPX) # NMAKE/WMAKE doesn't supports $d()
|
||||
XUPX=@rem
|
||||
UPXOPT=
|
||||
!endif
|
||||
!endif
|
||||
|
||||
!include "..\mkfiles\$(COMPILER).mak"
|
||||
|
||||
TARGET=$(TARGET)$(XCPU)$(XFAT)
|
||||
|
@ -331,7 +331,6 @@ int main(int argc, char **argv)
|
||||
int compress_sys_file;
|
||||
char *upx, *tmpexe, *buffer;
|
||||
char cmdbuf[128];
|
||||
int UPX = FALSE;
|
||||
int i;
|
||||
FILE *dest;
|
||||
long size;
|
||||
@ -351,9 +350,6 @@ int main(int argc, char **argv)
|
||||
|
||||
switch (toupper(argptr[0]))
|
||||
{
|
||||
case 'U':
|
||||
UPX = TRUE;
|
||||
break;
|
||||
case 'S':
|
||||
if (silentcount >= LENGTH(silentSegments))
|
||||
{
|
||||
@ -373,9 +369,10 @@ int main(int argc, char **argv)
|
||||
/* arguments left :
|
||||
infile outfile relocation offset */
|
||||
|
||||
compress_sys_file = exeflat(UPX, argv[1], argv[2], argv[3],
|
||||
upx = getenv("XUPX");
|
||||
compress_sys_file = exeflat((int)upx, argv[1], argv[2], argv[3],
|
||||
silentSegments, silentcount);
|
||||
if (!UPX)
|
||||
if (upx == NULL)
|
||||
exit(0);
|
||||
|
||||
/* move kernel.sys tmp$$$$$.exe */
|
||||
@ -386,10 +383,6 @@ int main(int argc, char **argv)
|
||||
rename(argv[2], tmpexe);
|
||||
}
|
||||
|
||||
upx = getenv("XUPX");
|
||||
if (upx == NULL)
|
||||
upx = "UPX";
|
||||
|
||||
#if !defined(__TURBOC__)
|
||||
/* upx kernel.exe -o kernel.sys */
|
||||
_snprintf(cmdbuf, sizeof cmdbuf, "%s %s", upx, tmpexe);
|
||||
|
Loading…
x
Reference in New Issue
Block a user