From a6ec339a4302245c7fa62663d7293d5ec5151367 Mon Sep 17 00:00:00 2001 From: turbocat Date: Tue, 8 Feb 2022 17:16:25 +0000 Subject: [PATCH] cmm: - removed bad makefiles; - fixed output filename bug; - restored the processing of command line switches in windows style. git-svn-id: svn://kolibrios.org@9702 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/develop/cmm/Makefile | 112 ------------------ programs/develop/cmm/Makefile.lin32 | 15 ++- programs/develop/cmm/Makefile.win | 110 ----------------- programs/develop/cmm/Makefile.win32 | 17 ++- programs/develop/cmm/MakefileKolibriOS | 111 ----------------- programs/develop/cmm/MakefileUnixWin | 110 ----------------- programs/develop/cmm/Makefile_pyakov_ubuntu32 | 111 ----------------- programs/develop/cmm/main.cpp | 15 ++- programs/develop/cmm/port.h | 6 +- 9 files changed, 34 insertions(+), 573 deletions(-) delete mode 100644 programs/develop/cmm/Makefile delete mode 100644 programs/develop/cmm/Makefile.win delete mode 100644 programs/develop/cmm/MakefileKolibriOS delete mode 100644 programs/develop/cmm/MakefileUnixWin delete mode 100755 programs/develop/cmm/Makefile_pyakov_ubuntu32 diff --git a/programs/develop/cmm/Makefile b/programs/develop/cmm/Makefile deleted file mode 100644 index 4fcf73fe57..0000000000 --- a/programs/develop/cmm/Makefile +++ /dev/null @@ -1,112 +0,0 @@ -# sudo apt-get install gcc-multilib g++-multilib - -Compiler = gcc - -Compiler_Options = -m32 -c -fpack-struct=2 -fno-exceptions -D_UNIX_ -#Compiler_Options = -c -fpack-struct=2 -fno-exceptions -O2 -D_WIN32_ - -#-D: _WIN32_ or _UNIX_ -#-D: for _WIN32_ add -D__CONSOLE__ - -Exe_file = cmm - - - -Path_Libs = -Ld:/TEMP/Dev-Cpp/lib/gcc/mingw32/3.4.2 -Ld:/TEMP/Dev-Cpp/lib/gcc -Ld:/TEMP/Dev-Cpp/lib -Ld:/TEMP/Dev-Cpp/lib - -Add_Libs = d:/TEMP/Dev-Cpp/lib/gcc/mingw32/3.4.2/crtbegin.o d:/TEMP/Dev-Cpp/lib/crt2.o d:/TEMP/Dev-Cpp/lib/gcc/mingw32/3.4.2/crtend.o - -Link_Libs = -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 - -My_Libs = main.o toka.o tokb.o tokc.o toke.o tokr.o errors.o debug.o outobj.o outpe.o disasm.o switch.o outle.o pointer.o new_type.o class.o res.o optreg.o libobj.o port.o - - -#Link_Libs = -lmingw32 -lgcc -lmoldname -lmingwex -lmingw32 -lmoldname -lmingwex -lmsvcrt -lgcc -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 - -#################### -## Makefile rules ## -#################### - -all : $(Exe_file) - -$(Exe_file) : $(My_Libs) -# ld -o cmm.exe $(Path_Libs) $(Add_Libs) $(My_Libs) $(Link_Libs) - $(Compiler) -m32 -o $(Exe_file) $(My_Libs) -# ld -o cmm.exe -Bdynamic d:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/crtend.o d:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/../../../crt2.o d:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/crtbegin.o -Ld:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2 -Ld:/TEMP/Dev-Cpp/bin/../lib/gcc -Ld:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/../../.. -Ld:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/../../.. main.o toka.o tokb.o tokc.o toke.o tokr.o errors.o debug.o outobj.o outpe.o disasm.o switch.o outle.o pointer.o new_type.o class.o res.o optreg.o libobj.o port.o -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lmoldname -lmingwex -lmsvcrt -lgcc - - - - -clean: - rm *.o - - -# next are the exceptions that don't have to be compiled with the /zu option -# since they will never be called from a interrupt. hey.. I _tried_ to find -# a clean solution.. - -main.o : main.cpp - $(Compiler) $(Compiler_Options) $< - -toka.o : toka.cpp - $(Compiler) $(Compiler_Options) $< - -tokb.o : tokb.cpp - $(Compiler) $(Compiler_Options) $< - -tokc.o : tokc.cpp - $(Compiler) $(Compiler_Options) $< - -toke.o : toke.cpp - $(Compiler) $(Compiler_Options) $< - -tokr.o : tokr.cpp - $(Compiler) $(Compiler_Options) $< - -errors.o :errors.cpp - $(Compiler) $(Compiler_Options) $< - -debug.o : debug.cpp - $(Compiler) $(Compiler_Options) $< - -outobj.o : outobj.cpp - $(Compiler) $(Compiler_Options) $< - -outpe.o : outpe.cpp - $(Compiler) $(Compiler_Options) $< - -disasm.o : disasm.cpp - $(Compiler) $(Compiler_Options) $< - -switch.o : switch.cpp - $(Compiler) $(Compiler_Options) $< - -outle.o : outle.cpp - $(Compiler) $(Compiler_Options) $< - -pointer.o : pointer.cpp - $(Compiler) $(Compiler_Options) $< - -new_type.o : new_type.cpp - $(Compiler) $(Compiler_Options) $< - -class.o : class.cpp - $(Compiler) $(Compiler_Options) $< - -res.o : res.cpp - $(Compiler) $(Compiler_Options) $< - -optreg.o : optreg.cpp - $(Compiler) $(Compiler_Options) $< - -libobj.o : libobj.cpp - $(Compiler) $(Compiler_Options) $< - -port.o: port.cpp - $(Compiler) $(Compiler_Options) $< - -.cpp.o: - $(Compiler) $(Compiler_Options) $< - -.asm.o: - fasm $< diff --git a/programs/develop/cmm/Makefile.lin32 b/programs/develop/cmm/Makefile.lin32 index cf1e88982d..94676e77c8 100644 --- a/programs/develop/cmm/Makefile.lin32 +++ b/programs/develop/cmm/Makefile.lin32 @@ -1,10 +1,15 @@ -CPPFLAGS=-m32 -fpack-struct=2 -fno-exceptions -std=c++03 -Wno-write-strings -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -DO_BINARY=0 -D_UNIX_ -LDFLAGS=-m32 +CPPFLAGS= -m32 -fpack-struct=2 -fno-exceptions -std=c++03 -Wno-write-strings -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -DO_BINARY=0 -D_UNIX_ +LDFLAGS= -m32 OBJS=$(patsubst %.cpp, %.o, $(wildcard *.cpp)) -c--: $(OBJS) - g++ $(LDFLAGS) $^ -o $@ +TARGET = c-- + +$(TARGET): $(OBJS) + $(CC) $(LDFLAGS) $^ -o $@ %.o: %.cpp - g++ $(CPPFLAGS) -c $< + $(CC) $(CPPFLAGS) -c $< + +clean: + rm -f $(OBJS) $(TARGET) diff --git a/programs/develop/cmm/Makefile.win b/programs/develop/cmm/Makefile.win deleted file mode 100644 index 5db627acfd..0000000000 --- a/programs/develop/cmm/Makefile.win +++ /dev/null @@ -1,110 +0,0 @@ -Compiler = gcc - -#Compiler_Options = -c -fpack-struct=2 -fno-exceptions -D_UNIX_ -Compiler_Options = -c -fpack-struct=2 -fno-exceptions -O2 -D_WIN32_ - -#-D: _WIN32_ or _UNIX_ -#-D: for _WIN32_ add -D__CONSOLE__ - -Exe_file = cmm - - - -Path_Libs = -Ld:/TEMP/Dev-Cpp/lib/gcc/mingw32/3.4.2 -Ld:/TEMP/Dev-Cpp/lib/gcc -Ld:/TEMP/Dev-Cpp/lib -Ld:/TEMP/Dev-Cpp/lib - -Add_Libs = d:/TEMP/Dev-Cpp/lib/gcc/mingw32/3.4.2/crtbegin.o d:/TEMP/Dev-Cpp/lib/crt2.o d:/TEMP/Dev-Cpp/lib/gcc/mingw32/3.4.2/crtend.o - -Link_Libs = -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 - -My_Libs = main.o toka.o tokb.o tokc.o toke.o tokr.o errors.o debug.o outobj.o outpe.o disasm.o switch.o outle.o pointer.o new_type.o class.o res.o optreg.o libobj.o port.o - - -#Link_Libs = -lmingw32 -lgcc -lmoldname -lmingwex -lmingw32 -lmoldname -lmingwex -lmsvcrt -lgcc -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 - -#################### -## Makefile rules ## -#################### - -all : $(Exe_file) - -$(Exe_file) : $(My_Libs) - ld -o cmm.exe $(Path_Libs) $(Add_Libs) $(My_Libs) $(Link_Libs) -# $(Compiler) -o $(Exe_file) $(All_Libs) -# ld -o cmm.exe -Bdynamic d:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/crtend.o d:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/../../../crt2.o d:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/crtbegin.o -Ld:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2 -Ld:/TEMP/Dev-Cpp/bin/../lib/gcc -Ld:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/../../.. -Ld:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/../../.. main.o toka.o tokb.o tokc.o toke.o tokr.o errors.o debug.o outobj.o outpe.o disasm.o switch.o outle.o pointer.o new_type.o class.o res.o optreg.o libobj.o port.o -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lmoldname -lmingwex -lmsvcrt -lgcc - - - - -clean: - rm *.o - - -# next are the exceptions that don't have to be compiled with the /zu option -# since they will never be called from a interrupt. hey.. I _tried_ to find -# a clean solution.. - -main.o : main.cpp - $(Compiler) $(Compiler_Options) $< - -toka.o : toka.cpp - $(Compiler) $(Compiler_Options) $< - -tokb.o : tokb.cpp - $(Compiler) $(Compiler_Options) $< - -tokc.o : tokc.cpp - $(Compiler) $(Compiler_Options) $< - -toke.o : toke.cpp - $(Compiler) $(Compiler_Options) $< - -tokr.o : tokr.cpp - $(Compiler) $(Compiler_Options) $< - -errors.o :errors.cpp - $(Compiler) $(Compiler_Options) $< - -debug.o : debug.cpp - $(Compiler) $(Compiler_Options) $< - -outobj.o : outobj.cpp - $(Compiler) $(Compiler_Options) $< - -outpe.o : outpe.cpp - $(Compiler) $(Compiler_Options) $< - -disasm.o : disasm.cpp - $(Compiler) $(Compiler_Options) $< - -switch.o : switch.cpp - $(Compiler) $(Compiler_Options) $< - -outle.o : outle.cpp - $(Compiler) $(Compiler_Options) $< - -pointer.o : pointer.cpp - $(Compiler) $(Compiler_Options) $< - -new_type.o : new_type.cpp - $(Compiler) $(Compiler_Options) $< - -class.o : class.cpp - $(Compiler) $(Compiler_Options) $< - -res.o : res.cpp - $(Compiler) $(Compiler_Options) $< - -optreg.o : optreg.cpp - $(Compiler) $(Compiler_Options) $< - -libobj.o : libobj.cpp - $(Compiler) $(Compiler_Options) $< - -port.o: port.cpp - $(Compiler) $(Compiler_Options) $< - -.cpp.o: - $(Compiler) $(Compiler_Options) $< - -.asm.o: - fasm $< diff --git a/programs/develop/cmm/Makefile.win32 b/programs/develop/cmm/Makefile.win32 index 4929c4ddd8..2abea39bb2 100644 --- a/programs/develop/cmm/Makefile.win32 +++ b/programs/develop/cmm/Makefile.win32 @@ -1,10 +1,17 @@ -CPPFLAGS=-m32 -fpack-struct=2 -fno-exceptions -std=c++03 -Wno-write-strings -D_WIN32_ -LDFLAGS=-m32 +CC = i686-w64-mingw32-gcc + +CPPFLAGS = -m32 -fpack-struct=2 -fno-exceptions -std=c++03 -Wno-write-strings -D_WIN32_ -DO_BINARY=0 +LDFLAGS = -m32 OBJS=$(patsubst %.cpp, %.o, $(wildcard *.cpp)) -c--.exe: $(OBJS) - g++ $^ -o $@ +TARGET = c--.exe + +$(TARGET): $(OBJS) + $(CC) $(LDFLAGS) $^ -o $@ %.o: %.cpp - g++ $(CPPFLAGS) -c $< + $(CC) $(CPPFLAGS) -c $< + +clean: + rm -f $(OBJS) $(TARGET) diff --git a/programs/develop/cmm/MakefileKolibriOS b/programs/develop/cmm/MakefileKolibriOS deleted file mode 100644 index e24384877b..0000000000 --- a/programs/develop/cmm/MakefileKolibriOS +++ /dev/null @@ -1,111 +0,0 @@ -Compiler = kos32-gcc -Linker = kos32-ld - -SDK_DIR:= $(abspath ../../../contrib/sdk) - -Includes = -Id:\TEMP\mprog\kos\includes -I$(SDK_DIR)/sources/newlib/libc/include - -Compatib_Posix = -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp - -Compiler_Options = -c -fpack-struct=2 -fno-exceptions -D_KOS_ -U_Win32 -U_WIN32 -U__MINGW32__ \ - -mno-ms-bitfields -Wno-write-strings $(Includes) $(Compatib_Posix) - -Exe_file = cmm.kex - - -Path_Libs = -Ld:/TEMP/Dev-Cpp/lib/kos -L $(SDK_DIR)/lib -#-Ld:/TEMP/Dev-Cpp/lib/gcc/mingw32/3.4.2 -Ld:/TEMP/Dev-Cpp/lib/gcc -Ld:/TEMP/Dev-Cpp/lib -Ld:/TEMP/Dev-Cpp/lib - -Add_Libs = - -#Link_Libs = -lc -lgcc -Link_Libs = -static -S -nostdlib -T $(SDK_DIR)/lib/app-dynamic.lds \ - --image-base 0 -lgcc -ldll -lc.dll - -My_Libs = main.o port.o toka.o tokb.o tokc.o toke.o tokr.o errors.o debug.o outobj.o outpe.o disasm.o switch.o outle.o pointer.o new_type.o class.o res.o optreg.o libobj.o - -#################### -## Makefile rules ## -#################### - -all : $(Exe_file) - -$(Exe_file) : $(My_Libs) - $(Linker) -o cmm.kex --stack 0x100000 $(Path_Libs) $(Add_Libs) $(My_Libs) $(Link_Libs) - objcopy cmm.kex -O binary - kpack cmm.kex - -clean: - rm *.o - - -# next are the exceptions that don't have to be compiled with the /zu option -# since they will never be called from a interrupt. hey.. I _tried_ to find -# a clean solution.. - -main.o : main.cpp - $(Compiler) $(Compiler_Options) $< - -toka.o : toka.cpp - $(Compiler) $(Compiler_Options) $< - -tokb.o : tokb.cpp - $(Compiler) $(Compiler_Options) $< - -tokc.o : tokc.cpp - $(Compiler) $(Compiler_Options) $< - -toke.o : toke.cpp - $(Compiler) $(Compiler_Options) $< - -tokr.o : tokr.cpp - $(Compiler) $(Compiler_Options) $< - -errors.o :errors.cpp - $(Compiler) $(Compiler_Options) $< - -debug.o : debug.cpp - $(Compiler) $(Compiler_Options) $< - -outobj.o : outobj.cpp - $(Compiler) $(Compiler_Options) $< - -outpe.o : outpe.cpp - $(Compiler) $(Compiler_Options) $< - -disasm.o : disasm.cpp - $(Compiler) $(Compiler_Options) $< - -switch.o : switch.cpp - $(Compiler) $(Compiler_Options) $< - -outle.o : outle.cpp - $(Compiler) $(Compiler_Options) $< - -pointer.o : pointer.cpp - $(Compiler) $(Compiler_Options) $< - -new_type.o : new_type.cpp - $(Compiler) $(Compiler_Options) $< - -class.o : class.cpp - $(Compiler) $(Compiler_Options) $< - -res.o : res.cpp - $(Compiler) $(Compiler_Options) $< - -optreg.o : optreg.cpp - $(Compiler) $(Compiler_Options) $< - -libobj.o : libobj.cpp - $(Compiler) $(Compiler_Options) $< - -port.o: port.cpp - $(Compiler) $(Compiler_Options) $< - -.cpp.o: - $(Compiler) $(Compiler_Options) $< - -.asm.o: - fasm $< - diff --git a/programs/develop/cmm/MakefileUnixWin b/programs/develop/cmm/MakefileUnixWin deleted file mode 100644 index 62426af32e..0000000000 --- a/programs/develop/cmm/MakefileUnixWin +++ /dev/null @@ -1,110 +0,0 @@ -Compiler = gcc - -Compiler_Options = -c -m32 -fpack-struct=2 -fno-exceptions -D_UNIX_ -#Compiler_Options = -c -fpack-struct=2 -fno-exceptions -O2 -D_WIN32_ - -#-D: _WIN32_ or _UNIX_ -#-D: for _WIN32_ add -D__CONSOLE__ - -Exe_file = cmm - - - -Path_Libs = -Ld:/TEMP/Dev-Cpp/lib/gcc/mingw32/3.4.2 -Ld:/TEMP/Dev-Cpp/lib/gcc -Ld:/TEMP/Dev-Cpp/lib -Ld:/TEMP/Dev-Cpp/lib - -Add_Libs = d:/TEMP/Dev-Cpp/lib/gcc/mingw32/3.4.2/crtbegin.o d:/TEMP/Dev-Cpp/lib/crt2.o d:/TEMP/Dev-Cpp/lib/gcc/mingw32/3.4.2/crtend.o - -Link_Libs = -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 - -My_Libs = main.o toka.o tokb.o tokc.o toke.o tokr.o errors.o debug.o outobj.o outpe.o disasm.o switch.o outle.o pointer.o new_type.o class.o res.o optreg.o libobj.o port.o - - -#Link_Libs = -lmingw32 -lgcc -lmoldname -lmingwex -lmingw32 -lmoldname -lmingwex -lmsvcrt -lgcc -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 - -#################### -## Makefile rules ## -#################### - -all : $(Exe_file) - -$(Exe_file) : $(My_Libs) -# ld -o cmm.exe $(Path_Libs) $(Add_Libs) $(My_Libs) $(Link_Libs) - $(Compiler) -m32 -o $(Exe_file) $(My_Libs) -# ld -o cmm.exe -Bdynamic d:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/crtend.o d:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/../../../crt2.o d:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/crtbegin.o -Ld:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2 -Ld:/TEMP/Dev-Cpp/bin/../lib/gcc -Ld:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/../../.. -Ld:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/../../.. main.o toka.o tokb.o tokc.o toke.o tokr.o errors.o debug.o outobj.o outpe.o disasm.o switch.o outle.o pointer.o new_type.o class.o res.o optreg.o libobj.o port.o -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lmoldname -lmingwex -lmsvcrt -lgcc - - - - -clean: - rm *.o - - -# next are the exceptions that don't have to be compiled with the /zu option -# since they will never be called from a interrupt. hey.. I _tried_ to find -# a clean solution.. - -main.o : main.cpp - $(Compiler) $(Compiler_Options) $< - -toka.o : toka.cpp - $(Compiler) $(Compiler_Options) $< - -tokb.o : tokb.cpp - $(Compiler) $(Compiler_Options) $< - -tokc.o : tokc.cpp - $(Compiler) $(Compiler_Options) $< - -toke.o : toke.cpp - $(Compiler) $(Compiler_Options) $< - -tokr.o : tokr.cpp - $(Compiler) $(Compiler_Options) $< - -errors.o :errors.cpp - $(Compiler) $(Compiler_Options) $< - -debug.o : debug.cpp - $(Compiler) $(Compiler_Options) $< - -outobj.o : outobj.cpp - $(Compiler) $(Compiler_Options) $< - -outpe.o : outpe.cpp - $(Compiler) $(Compiler_Options) $< - -disasm.o : disasm.cpp - $(Compiler) $(Compiler_Options) $< - -switch.o : switch.cpp - $(Compiler) $(Compiler_Options) $< - -outle.o : outle.cpp - $(Compiler) $(Compiler_Options) $< - -pointer.o : pointer.cpp - $(Compiler) $(Compiler_Options) $< - -new_type.o : new_type.cpp - $(Compiler) $(Compiler_Options) $< - -class.o : class.cpp - $(Compiler) $(Compiler_Options) $< - -res.o : res.cpp - $(Compiler) $(Compiler_Options) $< - -optreg.o : optreg.cpp - $(Compiler) $(Compiler_Options) $< - -libobj.o : libobj.cpp - $(Compiler) $(Compiler_Options) $< - -port.o: port.cpp - $(Compiler) $(Compiler_Options) $< - -.cpp.o: - $(Compiler) $(Compiler_Options) $< - -.asm.o: - fasm $< diff --git a/programs/develop/cmm/Makefile_pyakov_ubuntu32 b/programs/develop/cmm/Makefile_pyakov_ubuntu32 deleted file mode 100755 index 1926be5781..0000000000 --- a/programs/develop/cmm/Makefile_pyakov_ubuntu32 +++ /dev/null @@ -1,111 +0,0 @@ -Compiler = gcc - -Compatib_Posix = -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -Compiler_Options = -m32 -c -fpack-struct=2 -fno-exceptions -D_UNIX_ $(Compatib_Posix) -Wno-narrowing -#Compiler_Options = -c -fpack-struct=2 -fno-exceptions -O2 -D_WIN32_ - -#-D: _WIN32_ or _UNIX_ -#-D: for _WIN32_ add -D__CONSOLE__ - -Exe_file = cmm - - - -Path_Libs = -Ld:/TEMP/Dev-Cpp/lib/gcc/mingw32/3.4.2 -Ld:/TEMP/Dev-Cpp/lib/gcc -Ld:/TEMP/Dev-Cpp/lib -Ld:/TEMP/Dev-Cpp/lib - -Add_Libs = d:/TEMP/Dev-Cpp/lib/gcc/mingw32/3.4.2/crtbegin.o d:/TEMP/Dev-Cpp/lib/crt2.o d:/TEMP/Dev-Cpp/lib/gcc/mingw32/3.4.2/crtend.o - -Link_Libs = -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 - -My_Libs = main.o toka.o tokb.o tokc.o toke.o tokr.o errors.o debug.o outobj.o outpe.o disasm.o switch.o outle.o pointer.o new_type.o class.o res.o optreg.o libobj.o port.o - - -#Link_Libs = -lmingw32 -lgcc -lmoldname -lmingwex -lmingw32 -lmoldname -lmingwex -lmsvcrt -lgcc -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 - -#################### -## Makefile rules ## -#################### - -all : $(Exe_file) - -$(Exe_file) : $(My_Libs) -# ld -o cmm.exe $(Path_Libs) $(Add_Libs) $(My_Libs) $(Link_Libs) - $(Compiler) -m32 -o $(Exe_file) $(My_Libs) -# ld -o cmm.exe -Bdynamic d:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/crtend.o d:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/../../../crt2.o d:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/crtbegin.o -Ld:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2 -Ld:/TEMP/Dev-Cpp/bin/../lib/gcc -Ld:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/../../.. -Ld:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/../../.. main.o toka.o tokb.o tokc.o toke.o tokr.o errors.o debug.o outobj.o outpe.o disasm.o switch.o outle.o pointer.o new_type.o class.o res.o optreg.o libobj.o port.o -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lmoldname -lmingwex -lmsvcrt -lgcc - - - - -clean: - rm *.o - - -# next are the exceptions that don't have to be compiled with the /zu option -# since they will never be called from a interrupt. hey.. I _tried_ to find -# a clean solution.. - -main.o : main.cpp - $(Compiler) $(Compiler_Options) $< - -toka.o : toka.cpp - $(Compiler) $(Compiler_Options) $< - -tokb.o : tokb.cpp - $(Compiler) $(Compiler_Options) $< - -tokc.o : tokc.cpp - $(Compiler) $(Compiler_Options) $< - -toke.o : toke.cpp - $(Compiler) $(Compiler_Options) $< - -tokr.o : tokr.cpp - $(Compiler) $(Compiler_Options) $< - -errors.o :errors.cpp - $(Compiler) $(Compiler_Options) $< - -debug.o : debug.cpp - $(Compiler) $(Compiler_Options) $< - -outobj.o : outobj.cpp - $(Compiler) $(Compiler_Options) $< - -outpe.o : outpe.cpp - $(Compiler) $(Compiler_Options) $< - -disasm.o : disasm.cpp - $(Compiler) $(Compiler_Options) $< - -switch.o : switch.cpp - $(Compiler) $(Compiler_Options) $< - -outle.o : outle.cpp - $(Compiler) $(Compiler_Options) $< - -pointer.o : pointer.cpp - $(Compiler) $(Compiler_Options) $< - -new_type.o : new_type.cpp - $(Compiler) $(Compiler_Options) $< - -class.o : class.cpp - $(Compiler) $(Compiler_Options) $< - -res.o : res.cpp - $(Compiler) $(Compiler_Options) $< - -optreg.o : optreg.cpp - $(Compiler) $(Compiler_Options) $< - -libobj.o : libobj.cpp - $(Compiler) $(Compiler_Options) $< - -port.o: port.cpp - $(Compiler) $(Compiler_Options) $< - -.cpp.o: - $(Compiler) $(Compiler_Options) $< - -.asm.o: - fasm $< diff --git a/programs/develop/cmm/main.cpp b/programs/develop/cmm/main.cpp index 22829c43f5..38188f7110 100644 --- a/programs/develop/cmm/main.cpp +++ b/programs/develop/cmm/main.cpp @@ -36,7 +36,7 @@ char *winstub=NULL; FILE *hout=NULL; const char *namestartupfile="startup.h--"; -char outext[4]="kex"; +char outext[4] = "com"; short extflag=TRUE;//расширение можно присвоить //int scrsize; unsigned char gwarning=FALSE; @@ -226,7 +226,7 @@ void CheckUndefClassProc(); void ParseObjCommand(int cmd); #ifdef _KOS_ -extern "C"{ +extern "C" { void con_set_title(char* title); } #endif @@ -301,8 +301,8 @@ unsigned char pari=FALSE; LoadIni((char *)"c--.ini"); for(count=1;count