Clean up Borland C++ makefiles and add (lousy) documentation
authorkvigor <kvigor@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 5 Mar 2000 23:47:14 +0000 (23:47 +0000)
committerkvigor <kvigor@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 5 Mar 2000 23:47:14 +0000 (23:47 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@166 4a8a32a2-be11-0410-ad9d-d568d2c75423

Bcc.inc [new file with mode: 0644]
as/mcs51/Makefile.bcc
bin/packihx
doc/bccinst.txt [new file with mode: 0644]
src/Makefile.bcc
src/mcs51/Makefile.bcc
src/z80/Makefile.bcc
support/cpp/Makefile.bcc

diff --git a/Bcc.inc b/Bcc.inc
new file mode 100644 (file)
index 0000000..68c872d
--- /dev/null
+++ b/Bcc.inc
@@ -0,0 +1,6 @@
+#Generic rules and options for building with Borland C++
+
+OFLAGS = -6 -O2 -g0 -w-proto
+
+.c.obj:
+        BCC32 -c $(OFLAGS) $(CFLAGS) $(CPPFLAGS) $<
index f62392a171fb7907e8e2d8bdfbdac83c4ca28e4e..e289a428625f68cfee92b67f9e20ef53c82c12e9 100644 (file)
@@ -10,14 +10,12 @@ VERSIONP        = 0
 
 PRJDIR         = ../..
 
-CPPFLAGS       =  -I. -I$(PRJDIR)
-CFLAGS          = -6 -O -g0
+!include ..\..\Bcc.inc
+
+CFLAGS        =  -I. -I$(PRJDIR)
 M_OR_MM                = -MM
 LDFLAGS                = 
 
-.c.obj:
-        BCC32 -c $(CFLAGS) $(CPPFLAGS) $<
-
 ASOBJECTS       = asmain.obj aslex.obj assym.obj assubr.obj asnoice.obj \
                   asexpr.obj asdata.obj aslist.obj asout.obj asstore.obj \
                   i51ext.obj i51pst.obj i51mch.obj i51adr.obj
index f4a12954255e7978e0637b89abff28c03696f493..4956fe51d30cce9ff4d7720b59eb6a134697787b 100755 (executable)
@@ -59,7 +59,7 @@ while (<>)
            &flush_pending_data;
            $pendingDataStart = 0;
            $nextOffset = 0;
-           print;
+            print;
        }
        else
        {
diff --git a/doc/bccinst.txt b/doc/bccinst.txt
new file mode 100644 (file)
index 0000000..76e722b
--- /dev/null
@@ -0,0 +1,20 @@
+Building SDCC with Borland C++ under Windows
+
+1: Build SDCC under Cygwin as documented in cygwininst.txt (this is
+necessary in order to run all the necessary configuration steps).
+
+2: If necessary, modify support\gc\BCC_Makefile to point to your Borland
+C++ installation.
+
+3: From the sdcc directory, run the command "make -f Makefile.bcc". This
+should regenerate all the .exe files in the bin directory except for
+sdcdb.exe (which currently doesn't build under Borland C++).
+
+4: If you modify any source files and need to rebuild, be aware that the
+dependancies may not be correctly calculated. The safest option is to
+delete all .obj files and run the build again. From a Cygwin BASH
+prompt, this can easily be done with the commmand:
+
+ 'find . -name "*.obj" -print | xargs rm'
+
+from the sdcc directory.
index d788d391fdecfceab453ad32a9b3a71573edbb4b..ce5d24a36b8070758e0d9b0688cccf494646b6f0 100644 (file)
@@ -42,10 +42,8 @@ ports:
 $(TARGET): $(OBJECTS) $(PORT_LIBS)
         bcc32 -e$(TARGET) $(OBJECTS) $(PORT_LIBS) $(LIBGC)
 
-CFLAGS  = -6 -O -g0 -I. -I.. -I..\support
-
-.c.obj:
-        BCC32 -c $(CFLAGS) $(CPPFLAGS) $<
+!include ..\Bcc.inc
+CFLAGS  = -I. -I.. -I..\support
 
 SDCCy.h: SDCCy.c
 
index bc0ae8975877c2e6b30b5547944e5d76891a849c..4b17a92d6e87baf9e768207bae6bdda19fbbcf13 100644 (file)
@@ -5,10 +5,8 @@ PRJDIR = ../..
 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)
 
index 1b2c468887e5c10753773cfd07c31bd8b95385f0..d6b240b7b1c35f702cfd2047f62571b7b8bd0a15 100644 (file)
@@ -5,10 +5,8 @@ PRJDIR = ../..
 OBJ = gen.obj ralloc.obj main.obj gbz80.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)
 
index 8b6ab2b907842f351a08e4d2d529aeb2374576f8..66758159d6527c64c14e5b6a80286320596ea529 100644 (file)
@@ -23,9 +23,8 @@ man2dir         = $(mandir)/man2
 infodir         = ${prefix}/info
 
 STD_INC         = @sdcc_include_dir@
-#CPPFLAGS        =  -I. -I$(PRJDIR) -D_FORASXXXX_
-#CFLAGS          = -ggdb -O2 -pipe
-CFLAGS  = -6 -O -g0 -I. -I$(PRJDIR) -D_FORASXXXX_
+!include ..\..\bcc.inc
+CFLAGS  = -I. -I$(PRJDIR) -D_FORASXXXX_
 M_OR_MM         = -MM
 LDFLAGS                = 
 
@@ -43,10 +42,5 @@ $(TARGET): $(OBJECTS)
 
 !include Makefile.dep
 
-# My rules
-# --------
-.c.obj:
-        BCC32 -c $(CFLAGS) $(CPPFLAGS) $<
-
 
 # End of cpp/Makefile