New memory allocation functions with Linux fixes
[fw/sdcc] / support / cpp / Makefile.in
index 9bf1a00006e1ec1d655df6fb86beedc076601a47..21191d2b20c37a4c3dcb34c31f104fa1b038d402 100644 (file)
@@ -12,6 +12,10 @@ CC           = @CC@
 CPP            = @CPP@
 INSTALL                = @INSTALL@
 
+# Source library
+
+SLIB           =  ../Util
+
 PRJDIR         = ../..
 
 srcdir         = @srcdir@
@@ -27,12 +31,14 @@ man2dir         = $(mandir)/man2
 infodir         = ${prefix}/info
 
 STD_INC                = @sdcc_include_dir@
-CPPFLAGS       = @CPPFLAGS@ -I. -I$(PRJDIR) -D_FORASXXXX_
+CPPFLAGS       = @CPPFLAGS@ -I. -I$(PRJDIR) -I$(SLIB) -D_FORASXXXX_
 CFLAGS         = @CFLAGS@
 M_OR_MM                = @M_OR_MM@
 LDFLAGS                = @LDFLAGS@
 
-OBJECTS                = cppalloc.o cpperror.o cppexp.o cpphash.o cpplib.o cppmain.o 
+SLIBOBJS       = NewAlloc.o
+
+OBJECTS                = cppalloc.o cpperror.o cppexp.o cpphash.o cpplib.o cppmain.o support.o
 SOURCES                = $(patsubst %.o,%.c,$(OBJECTS))
 
 TARGET         = $(PRJDIR)/bin/sdcpp
@@ -42,8 +48,8 @@ TARGET                = $(PRJDIR)/bin/sdcpp
 # ------------------------------------------
 all: checkconf $(TARGET)
 
-$(TARGET): $(OBJECTS)
-       $(CC) $(LDFLAGS) -o $@ $(OBJECTS)
+$(TARGET): $(SLIBOBJS) $(OBJECTS)
+       $(CC) $(LDFLAGS) -o $@ $(SLIBOBJS) $(OBJECTS)
 
 # Compiling and installing everything and runing test
 # ---------------------------------------------------
@@ -88,6 +94,8 @@ include clean.mk
 .c.o:
        $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
 
+$(SLIBOBJS):%.o:$(SLIB)/%.c
+       $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
 
 # Remaking configuration
 # ----------------------