Changed a few Makefiles & Fixed 3 bugs.
[fw/sdcc] / debugger / mcs51 / Makefile.in
index f48de5054764a5334b162836b38ebc09ca95182b..33f9fb5a42ccd9a024dc8a0e824add983f151ff5 100644 (file)
@@ -13,7 +13,7 @@ CPP           = @CPP@
 INSTALL                = @INSTALL@
 
 PRJDIR         = ../..
-DISABLE_GC     = @DISABLE_GC@
+SLIB           = $(PRJDIR)/support/Util
 
 srcdir         = @srcdir@
 prefix         = @prefix@
@@ -28,23 +28,19 @@ man2dir         = $(mandir)/man2
 infodir         = ${prefix}/info
 
 STD_INC                = @sdcc_include_dir@
-CPPFLAGS       = @CPPFLAGS@ -I. -I$(PRJDIR) -I$(PRJDIR)/support
+CPPFLAGS       = @CPPFLAGS@ -I. -I$(PRJDIR) -I$(PRJDIR)/support -I$(SLIB)
 CFLAGS         = @CFLAGS@
 M_OR_MM                = @M_OR_MM@
 LDFLAGS                = @LDFLAGS@
 
-ifeq ($(DISABLE_GC),1)
 LIBS            = @LIBS@
 LIBDIRS         =
-else
-LIBS            = -lgc @LIBS@
-LIBDIRS         = -L$(PRJDIR)/support/gc
-endif
 
+SLIBOBJS               = NewAlloc.o
 
 OBJECTS                = sdcdb.o symtab.o simi.o $(PRJDIR)/src/SDCCset.o \
                  break.o cmd.o $(PRJDIR)/src/SDCChasht.o \
-                 $(PRJDIR)/src/SDCCerr.o
+                 $(PRJDIR)/support/Util/SDCCerr.o
 SOURCES                = $(patsubst %.o,%.c,$(OBJECTS))
 
 TARGET         = $(PRJDIR)/bin/sdcdb
@@ -54,9 +50,6 @@ TARGET                = $(PRJDIR)/bin/sdcdb
 # ------------------------------------------
 all: checkconf $(TARGET)
 
-$(PRJDIR)/support/gc/libgc.a:
-       cd $(PRJDIR)/support/gc && $(MAKE)
-
 # Compiling and installing everything and runing test
 # ---------------------------------------------------
 install: all installdirs
@@ -69,6 +62,8 @@ install: all installdirs
 # --------------------------------
 uninstall:
        rm -f $(bindir)/sdcdb
+       rm -f $(bindir)/sdcdb.el
+       rm -f $(bindir)/sdcdbsrc.el
 
 
 # Performing self-test
@@ -99,12 +94,14 @@ include clean.mk
 
 # My rules
 # --------
-$(TARGET): $(OBJECTS)
-       $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBDIRS) $(LIBS)
+$(TARGET): $(OBJECTS) $(SLIBOBJS)
+       $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(SLIBOBJS) $(LIBDIRS) $(LIBS)
 
 .c.o:
        $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
 
+$(SLIBOBJS):%.o:$(SLIB)/%.c
+       $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
 
 # Remaking configuration
 # ----------------------