mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 12:12:25 +00:00
initial tcc/linux changes
This commit is contained in:
parent
e3a07e77fa
commit
a35668bf93
2 changed files with 17 additions and 4 deletions
|
|
@ -126,7 +126,7 @@ void determineOS() {
|
||||||
#define optimize "" // " -O1"
|
#define optimize "" // " -O1"
|
||||||
|
|
||||||
void determineCCompiler() {
|
void determineCCompiler() {
|
||||||
snprintf(libspec, sizeof(libspec), " -l %s", oname);
|
snprintf(libspec, sizeof(libspec), " -l%s", oname);
|
||||||
#if defined(__MINGW32__)
|
#if defined(__MINGW32__)
|
||||||
compiler = "mingw";
|
compiler = "mingw";
|
||||||
if (sizeof (void*) == 4) {
|
if (sizeof (void*) == 4) {
|
||||||
|
|
@ -137,6 +137,9 @@ void determineCCompiler() {
|
||||||
#elif defined(__clang__)
|
#elif defined(__clang__)
|
||||||
compiler = "clang";
|
compiler = "clang";
|
||||||
cc = "clang -fPIC -g" optimize;
|
cc = "clang -fPIC -g" optimize;
|
||||||
|
#elif defined(__TINYC__)
|
||||||
|
compiler = "tcc";
|
||||||
|
cc = "tcc -g";
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
compiler = "gcc";
|
compiler = "gcc";
|
||||||
if (strncasecmp(os, "cygwin", 6) == 0) {
|
if (strncasecmp(os, "cygwin", 6) == 0) {
|
||||||
|
|
|
||||||
|
|
@ -65,10 +65,20 @@ assemble:
|
||||||
cd $(BUILDDIR) && $(COMPILE) -c OPM.c extTools.c OPS.c OPT.c
|
cd $(BUILDDIR) && $(COMPILE) -c OPM.c extTools.c OPS.c OPT.c
|
||||||
cd $(BUILDDIR) && $(COMPILE) -c OPC.c OPV.c OPB.c OPP.c
|
cd $(BUILDDIR) && $(COMPILE) -c OPC.c OPV.c OPB.c OPP.c
|
||||||
|
|
||||||
|
ifeq ($(COMPILER),tcc)
|
||||||
|
cd $(BUILDDIR) && $(COMPILE) Compiler.c -o $(ROOTDIR)/$(OBECOMP) \
|
||||||
|
SYSTEM.o Configuration.o Platform.o Heap.o Out.o \
|
||||||
|
Strings.o Modules.o Files.o Reals.o Texts.o \
|
||||||
|
VT100.o extTools.o \
|
||||||
|
OPM.o OPS.o OPT.o OPC.o OPV.o OPB.o OPP.o
|
||||||
|
else
|
||||||
cd $(BUILDDIR) && $(COMPILE) $(STATICLINK) Compiler.c -o $(ROOTDIR)/$(OBECOMP) \
|
cd $(BUILDDIR) && $(COMPILE) $(STATICLINK) Compiler.c -o $(ROOTDIR)/$(OBECOMP) \
|
||||||
SYSTEM.o Configuration.o Platform.o Heap.o Out.o Strings.o \
|
SYSTEM.o Configuration.o Platform.o Heap.o Out.o \
|
||||||
Modules.o Files.o Reals.o Texts.o VT100.o extTools.o \
|
Strings.o Modules.o Files.o Reals.o Texts.o \
|
||||||
OPM.o OPS.o OPT.o OPC.o OPV.o OPB.o OPP.o
|
VT100.o extTools.o \
|
||||||
|
OPM.o OPS.o OPT.o OPC.o OPV.o OPB.o OPP.o
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
cp src/runtime/*.[ch] $(BUILDDIR)
|
cp src/runtime/*.[ch] $(BUILDDIR)
|
||||||
cp src/runtime/*.Txt $(BUILDDIR)
|
cp src/runtime/*.Txt $(BUILDDIR)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue