6 VERSIONHI = @VERSIONHI@
7 VERSIONLO = @VERSIONLO@
16 SLIB = $(PRJDIR)/support/Util
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 -I$(SLIB)
41 OBJECTS = sdcdb.o symtab.o simi.o $(PRJDIR)/src/SDCCset.o \
42 break.o cmd.o $(PRJDIR)/src/SDCChasht.o \
43 $(PRJDIR)/support/Util/SDCCerr.o
44 SOURCES = $(patsubst %.o,%.c,$(OBJECTS))
46 TARGET = $(PRJDIR)/bin/sdcdb
49 # Compiling entire program or any subproject
50 # ------------------------------------------
51 all: checkconf $(TARGET)
53 # Compiling and installing everything and runing test
54 # ---------------------------------------------------
55 install: all installdirs
56 $(INSTALL) -s $(TARGET) $(bindir)/sdcdb
57 cp $(PRJDIR)/debugger/mcs51/sdcdb.el $(bindir)/sdcdb.el
58 cp $(PRJDIR)/debugger/mcs51/sdcdbsrc.el $(bindir)/sdcdbsrc.el
61 # Deleting all the installed files
62 # --------------------------------
65 rm -f $(bindir)/sdcdb.el
66 rm -f $(bindir)/sdcdbsrc.el
69 # Performing self-test
70 # --------------------
74 # Performing installation test
75 # ----------------------------
79 # Creating installation directories
80 # ---------------------------------
82 $(INSTALL) -d $(bindir)
85 # Creating dependencies
86 # ---------------------
89 Makefile.dep: $(SOURCES) *.h $(PRJDIR)/*.h
90 $(CPP) $(CPPFLAGS) $(M_OR_MM) $(SOURCES) >Makefile.dep
97 $(TARGET): $(OBJECTS) $(SLIBOBJS)
98 $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(SLIBOBJS) $(LIBDIRS) $(LIBS)
101 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
103 $(SLIBOBJS):%.o:$(SLIB)/%.c
104 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
106 # Remaking configuration
107 # ----------------------
109 @if [ -f $(PRJDIR)/devel ]; then\
110 $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
113 # End of cpp/Makefile