6 VERSIONHI = @VERSIONHI@
7 VERSIONLO = @VERSIONLO@
16 DISABLE_GC = @DISABLE_GC@
20 exec_prefix = ${prefix}
21 bindir = ${exec_prefix}/bin
22 libdir = ${exec_prefix}/lib
24 includedir = ${prefix}/include
25 mandir = ${prefix}/man
26 man1dir = $(mandir)/man1
27 man2dir = $(mandir)/man2
28 infodir = ${prefix}/info
30 STD_INC = @sdcc_include_dir@
31 CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) -I$(PRJDIR)/support
36 ifeq ($(DISABLE_GC),1)
41 LIBDIRS = -L$(PRJDIR)/support/gc
45 OBJECTS = sdcdb.o symtab.o simi.o $(PRJDIR)/src/SDCCset.o \
46 break.o cmd.o $(PRJDIR)/src/SDCChasht.o \
47 $(PRJDIR)/src/SDCCerr.o
48 SOURCES = $(patsubst %.o,%.c,$(OBJECTS))
50 TARGET = $(PRJDIR)/bin/sdcdb
53 # Compiling entire program or any subproject
54 # ------------------------------------------
55 all: checkconf $(TARGET)
57 $(PRJDIR)/support/gc/libgc.a:
58 cd $(PRJDIR)/support/gc && $(MAKE)
60 # Compiling and installing everything and runing test
61 # ---------------------------------------------------
62 install: all installdirs
63 $(INSTALL) -s $(TARGET) $(bindir)/sdcdb
64 cp $(PRJDIR)/debugger/mcs51/sdcdb.el $(bindir)/sdcdb.el
65 cp $(PRJDIR)/debugger/mcs51/sdcdbsrc.el $(bindir)/sdcdbsrc.el
68 # Deleting all the installed files
69 # --------------------------------
74 # Performing self-test
75 # --------------------
79 # Performing installation test
80 # ----------------------------
84 # Creating installation directories
85 # ---------------------------------
87 $(INSTALL) -d $(bindir)
90 # Creating dependencies
91 # ---------------------
94 Makefile.dep: $(SOURCES) *.h $(PRJDIR)/*.h
95 $(CPP) $(CPPFLAGS) $(M_OR_MM) $(SOURCES) >Makefile.dep
102 $(TARGET): $(OBJECTS)
103 $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBDIRS) $(LIBS)
106 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
109 # Remaking configuration
110 # ----------------------
112 @if [ -f $(PRJDIR)/devel ]; then\
113 $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
116 # End of cpp/Makefile