#Generic rules and options for building with Borland C++
+SLIB = $(PRJDIR)/support/Util
+
OFLAGS = -6 -O2 -g0 -w-proto
.c.obj:
- BCC32 -c $(OFLAGS) $(CFLAGS) $(CPPFLAGS) $<
+ BCC32 -c -o$@ $(OFLAGS) $(CFLAGS) $(CPPFLAGS) -I$(SLIB) $<
make -f BCC_MAKEFILE gc.lib
cd ..\..
-ports: z80 mcs51 avr ds390
+ports: z80 mcs51 avr ds390 pic izt
z80:
cd src\z80
make -f Makefile.bcc
cd ..\..
+pic:
+ cd src\pic
+ make -f Makefile.bcc
+ cd ..\..
+
+izt:
+ cd src\izt
+ make -f Makefile.bcc
+ cd ..\..
+
sdcc:
cd src
make -f Makefile.bcc
-# Generated automatically from Makefile.in by configure.
-#
-#
-#
-
PRJDIR = ..
# !include $(PRJDIR)/Makefile.common
-PORTS = mcs51 z80 avr ds390 pic
-PORT_LIBS = mcs51/port.lib z80/port.lib avr/port.lib ds390/port.lib pic/port.lib
+!include ..\Bcc.inc
+CFLAGS = -I. -I.. -I..\support
+
+PORTS = mcs51 z80 avr ds390 pic izt
+PORT_LIBS = mcs51/port.lib z80/port.lib avr/port.lib ds390/port.lib pic/port.lib izt/port.lib
LIBS = -lgc
LIBDIRS = -L$(PRJDIR)/support/gc
LIBGC = $(PRJDIR)/support/gc/gc.lib
-OBJECTS = SDCCy.obj SDCClex.obj SDCCerr.obj SDCChasht.obj SDCCmain.obj \
+OBJECTS = SDCCy.obj SDCClex.obj SDCChasht.obj SDCCmain.obj \
SDCCsymt.obj SDCCopt.obj SDCCast.obj SDCCmem.obj SDCCval.obj \
SDCCicode.obj SDCCbitv.obj SDCCset.obj SDCClabel.obj \
SDCCBBlock.obj SDCCloop.obj SDCCcse.obj SDCCcflow.obj SDCCdflow.obj \
SDCClrange.obj SDCCptropt.obj SDCCpeeph.obj SDCCglue.obj \
asm.obj
+SLIBOBJS = $(SLIB)\SDCCerr.obj $(SLIB)\NewAlloc.obj
+
TARGET = $(PRJDIR)/bin/sdcc.exe
# Compiling entire program or any subproject
all: $(LIBGC) $(TARGET)
ports:
-# for i in $(PORTS); do $(MAKE) -C $$i; done
+ for i in $(PORTS); do $(MAKE) -C $$i; done
#$(PRJDIR)/support/gc/libgc.a:
# cd $(PRJDIR)/support/gc && $(MAKE)
# My rules
# --------
-$(TARGET): $(OBJECTS) $(PORT_LIBS)
- bcc32 -e$(TARGET) $(OBJECTS) $(PORT_LIBS) $(LIBGC)
-
-!include ..\Bcc.inc
-CFLAGS = -I. -I.. -I..\support
+$(TARGET): $(OBJECTS) $(SLIBOBJS) $(PORT_LIBS)
+ bcc32 -e$(TARGET) $(OBJECTS) $(SLIBOBJS) $(PORT_LIBS) $(LIBGC)
SDCCy.h: SDCCy.c
iTemp1 = iTemp0 + 8;
iTemp2 = iTemp1 + 8; */
if (isinSetWith (compItems, (void*)IC_LEFT (cdp->diCode),
- (void*)isOperandEqual) ||
+ (insetwithFunc)isOperandEqual) ||
isinSetWith (compItems, (void*)IC_RIGHT (cdp->diCode),
- (void*)isOperandEqual))
+ (insetwithFunc)isOperandEqual))
{
addSet (&compItems, IC_RESULT (cdp->diCode));
}
void deleteSetItem (set **, void *);
void deleteItemIf (set **, int (*cond) (void *, va_list),...);
int isinSet (set *, void *);
-int isinSetWith (set *, void *, int (*cfunc) (void *, void *));
+typedef int (* insetwithFunc) (void *, void *);
+int isinSetWith (set *, void *, insetwithFunc cfunc);
int applyToSet (set * list, int (*somefunc) (void *, va_list),...);
int applyToSetFTrue (set * list, int (*somefunc) (void *, va_list),...);
set *unionSets (set *, set *, int);
OBJ = gen.obj ralloc.obj main.obj
LIB = port.lib
-CFLAGS = -6 -O -g0 -I.. -I. -I..\.. -I..\..\support
-
-.c.obj:
- BCC32 -c $(CFLAGS) $(CPPFLAGS) $<
+!include ..\..\Bcc.inc
+CFLAGS = -I.. -I. -I..\.. -I..\..\support
all: $(LIB)
symbol *lbl;
int size=AOP_SIZE(result);
- emitcode (";",__FUNCTION__);
if (size<1 || size>2) {
// this should never happen
fprintf (stderr, "size!=1||2 (%d) in %s at line:%d \n",
- AOP_SIZE(result), __FUNCTION__, lineno);
+ AOP_SIZE(result), __FILE__, lineno);
exit (1);
}
--- /dev/null
+PRJDIR = ../..
+
+# !include $(PRJDIR)/Makefile.common
+
+OBJ = i186.obj ralloc.obj gen.obj tlcs900h.obj gen_generic.obj aop.obj util.obj
+LIB = port.lib
+
+!include ..\..\Bcc.inc
+CFLAGS = -I.. -I. -I..\.. -I..\..\support
+
+all: $(LIB)
+
+i186.obj: i186.c i186_mappings.i
+
+$(LIB): $(OBJ)
+ del $(LIB)
+ tlib /a $(LIB) +i186.obj +ralloc.obj +gen.obj +tlcs900h.obj
+ tlib /a $(LIB) +gen_generic.obj +aop.obj +util.obj
+
+.def.rul:
+ gawk -f ../SDCCpeeph.awk $< > $@
+
+# include clean.mk
static bool
_tryEmittingiCode (hTab * h, iCode * ic)
{
- EMITTER key =
- {ic->op, NULL};
+ EMITTER key; // = {ic->op, NULL}; Borland C chokes on this; initialize below
EMITTER *found;
+ key.op = ic->op;
+ key.emit = NULL;
+
found = hTabFindByKey (h, ic->op, &key, _emitterCompare);
if (found)
static char _defaultRules[] =
{
//#include "peeph.rul"
+ ""
};
/* list of key words used by i186 */
static char _defaultRules[] =
{
//#include "peeph.rul"
+ ""
};
static char *_tlcs900h_keywords[] =
if (size<1 || size>2) {
// this should never happen
fprintf (stderr, "size!=1||2 (%d) in %s at line:%d \n",
- AOP_SIZE(result), __FUNCTION__, lineno);
+ AOP_SIZE(result), __FILE__, lineno);
exit (1);
}
# !include $(PRJDIR)/Makefile.common
-OBJ = gen.obj ralloc.obj main.obj pcode.obj
+OBJ = gen.obj genarith.obj ralloc.obj main.obj glue.obj pcode.obj pcodepeep.obj
LIB = port.lib
!include ..\..\Bcc.inc
-CFLAGS = -I.. -I. -I..\.. -I..\..\support
+CFLAGS = -I.. -I. -I..\.. -I..\..\support -D__FUNCTION__=__FILE__
all: $(LIB)
$(LIB): peeph.rul $(OBJ)
del $(LIB)
- tlib /a $(LIB) +gen.obj +ralloc.obj +main.obj
+ tlib /a $(LIB) +gen.obj +genarith.obj +ralloc.obj +main.obj +glue.obj
+ tlib /a $(LIB) +pcode.obj +pcodepeep.obj
peeph.rul: peeph.def
gawk -f ../SDCCpeeph.awk peeph.def > peeph.rul
#include "pcode.h"
#include "ralloc.h"
+
+#if defined(__BORLANDC__) || defined(_MSC_VER)
+#define STRCASECMP stricmp
+#else
+#define STRCASECMP strcasecmp
+#endif
+
// Eventually this will go into device dependent files:
pCodeOpReg pc_status = {{PO_STATUS, "STATUS"}, -1, NULL,NULL};
pCodeOpReg pc_indf = {{PO_INDF, "INDF"}, -1, NULL,NULL};
while(pci) {
- if(strcasecmp(pci->mnemonic, mnem) == 0) {
+ if(STRCASECMP(pci->mnemonic, mnem) == 0) {
if((pci->num_ops <= 1) || (pci->dest == dest))
return(pci->op);
}
#include "pcode.h"
#include "ralloc.h"
+#if defined(__BORLANDC__) || defined(_MSC_VER)
+#define STRCASECMP stricmp
+#else
+#define STRCASECMP strcasecmp
+#endif
pCodeOp *popCopyGPR2Bit(pCodeOpReg *pc, int bitval);
{
int len;
- if(strcasecmp(reg, pc_status.pcop.name))
+ if(STRCASECMP(reg, pc_status.pcop.name))
return NULL;
len = strlen(bit);
-# Generated automatically from Makefile.in by configure.
-#
-#
-#
-
VERSION = 2.2.0
VERSIONHI = 2
VERSIONLO = 2
VERSIONP = 0
-PRJDIR = ../..
+PRJDIR = ..\..
srcdir = .
prefix = /cygnus/cygwin-b20/kvigor/
OBJECTS = cppalloc.obj cpperror.obj cppexp.obj cpphash.obj cpplib.obj cppmain.obj
+SLIBOBJS = $(SLIB)\NewAlloc.obj
+
TARGET = $(PRJDIR)\bin\sdcpp.exe
# ------------------------------------------
all: $(TARGET)
-$(TARGET): $(OBJECTS)
- bcc32 -e$(TARGET) $(OBJECTS)
+$(TARGET): $(SLIBOBJS) $(OBJECTS)
+ bcc32 -e$(TARGET) $(OBJECTS) $(SLIBOBJS)
!include Makefile.dep
all: gctest.exe cord\de.exe test_cpp.exe
-$(OBJS) test.obj: gc_priv.h gc_hdrs.h gc.h gcconfig.h MAKEFILE
+$(OBJS) test.obj: gc_priv.h gc_hdrs.h gc.h gcconfig.h BCC_MAKEFILE
gc.lib: $(OBJS)
-del gc.lib