6 VERSIONHI = @VERSIONHI@
7 VERSIONLO = @VERSIONLO@
17 SLIB = $(PRJDIR)/support/Util
21 exec_prefix = @exec_prefix@
25 includedir = @includedir@
27 man1dir = $(mandir)/man1
28 man2dir = $(mandir)/man2
31 STD_INC = @sdcc_include_dir@
32 CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) -I$(PRJDIR)/support -I$(SLIB)
42 OBJECTS = sdcdb.o symtab.o simi.o $(PRJDIR)/src/SDCCset.o \
43 break.o cmd.o $(PRJDIR)/src/SDCChasht.o \
44 $(PRJDIR)/support/Util/SDCCerr.o
45 SOURCES = $(patsubst %.o,%.c,$(OBJECTS))
47 TARGET = $(PRJDIR)/bin/sdcdb
50 # Compiling entire program or any subproject
51 # ------------------------------------------
52 all: checkconf $(TARGET)
54 # Compiling and installing everything and runing test
55 # ---------------------------------------------------
56 install: all installdirs
57 $(INSTALL) $(TARGET) $(bindir)/sdcdb
58 $(STRIP) $(bindir)/sdcdb
59 cp $(PRJDIR)/debugger/mcs51/sdcdb.el $(bindir)/sdcdb.el
60 cp $(PRJDIR)/debugger/mcs51/sdcdbsrc.el $(bindir)/sdcdbsrc.el
63 # Deleting all the installed files
64 # --------------------------------
67 rm -f $(bindir)/sdcdb.el
68 rm -f $(bindir)/sdcdbsrc.el
70 # Performing self-test
71 # --------------------
75 # Performing installation test
76 # ----------------------------
80 # Creating installation directories
81 # ---------------------------------
83 $(INSTALL) -d $(bindir)
86 # Creating dependencies
87 # ---------------------
90 Makefile.dep: $(SOURCES) *.h $(PRJDIR)/*.h
91 $(CPP) $(CPPFLAGS) $(M_OR_MM) $(SOURCES) >Makefile.dep
98 $(TARGET): $(OBJECTS) $(SLIBOBJS)
99 $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(SLIBOBJS) $(LIBDIRS) $(LIBS)
102 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
104 $(SLIBOBJS):%.o:$(SLIB)/%.c
105 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
107 # Remaking configuration
108 # ----------------------
110 @if [ -f $(PRJDIR)/devel ]; then\
111 $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
114 # End of cpp/Makefile