Fixed references to BuildCmdLine and my_system
[fw/sdcc] / src / Makefile.in
index 85e870b15b20bfdbf1ee243189c207a627a1f884..7302396c906b37cc5efab6371d2df001b4555118 100644 (file)
@@ -8,21 +8,21 @@ include $(PRJDIR)/Makefile.common
 
 USE_ALT_LEX    = 0
 
-PORTS          = mcs51 z80 avr ds390
+PORTS          = $(shell cat ../ports.build)
+ALLPORTS       = $(shell cat ../ports.all)
 PORT_LIBS      = $(PORTS:%=%/port.a)
 
-LIBS           = -lgc -lm @LIBS@
-ifeq ($(HAVE_LIBGC), 1)
-else
-LIBDIRS                = -L$(PRJDIR)/support/gc
-LIBGC          = $(PRJDIR)/support/gc/libgc.a
-endif
+LIBS           = -lm @LIBS@
+
+#CFLAGS          += -Werror
 
 ifdef SDCC_SUB_VERSION
 CFLAGS         += -DSDCC_SUB_VERSION_STR=\"$(SDCC_SUB_VERSION)\"
 endif
+SLIBOBJS       = SDCCerr.o NewAlloc.o MySystem.o BuildCmd.o
 
-OBJECTS        = SDCCy.o SDCCerr.o SDCChasht.o SDCCmain.o \
+OBJECTS        = SDCCy.o SDCChasht.o SDCCmain.o \
                  SDCCsymt.o SDCCopt.o SDCCast.o SDCCmem.o SDCCval.o \
                  SDCCicode.o SDCCbitv.o SDCCset.o SDCClabel.o \
                  SDCCBBlock.o SDCCloop.o SDCCcse.o SDCCcflow.o SDCCdflow.o \
@@ -43,7 +43,7 @@ TARGET                = $(PRJDIR)/bin/sdcc
 
 # Compiling entire program or any subproject
 # ------------------------------------------
-all: ports checkconf $(LIBGC) $(TARGET)
+all: ports checkconf $(TARGET)
 
 ports:
        for i in $(PORTS); do $(MAKE) -C $$i; done
@@ -61,7 +61,7 @@ install: all installdirs
 # --------------------------------
 uninstall:
        rm -f $(bindir)/sdcc
-
+       rm -f $(bindir)/packihx
 
 # Performing self-test
 # --------------------
@@ -92,12 +92,15 @@ include clean.mk
 
 # My rules
 # --------
-$(TARGET): $(OBJECTS) $(PORT_LIBS)
-       $(CC) -o $@ $(OBJECTS) $(PORT_LIBS) $(LIBDIRS) $(LIBS)
+$(TARGET): $(SLIBOBJS) $(OBJECTS) $(PORT_LIBS)
+       $(CC) -o $@ $(SLIBOBJS) $(OBJECTS) $(PORT_LIBS) $(LIBDIRS) $(LIBS)
 
 .c.o:
        $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
 
+$(SLIBOBJS):%.o:$(SLIB)/%.c
+       $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+
 reswords.h: reswords.gperf Makefile
        gperf -o -k1,2,4 -t -C -N is_reserved_word $< > $@