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)
44 OBJECTS = sdcdb.o symtab.o simi.o $(PRJDIR)/src/SDCCset.o \
45 break.o cmd.o $(PRJDIR)/src/SDCChasht.o \
46 $(PRJDIR)/support/Util/SDCCerr.o
47 SOURCES = $(patsubst %.o,%.c,$(OBJECTS))
49 TARGET = $(PRJDIR)/bin/sdcdb$(EXEEXT)
52 # Compiling entire program or any subproject
53 # ------------------------------------------
54 all: checkconf $(TARGET)
56 # Compiling and installing everything and runing test
57 # ---------------------------------------------------
58 install: all installdirs
59 $(INSTALL) $(TARGET) $(DESTDIR)$(bindir)/sdcdb$(EXEEXT)
60 $(STRIP) $(DESTDIR)$(bindir)/sdcdb$(EXEEXT)
61 cp $(PRJDIR)/debugger/mcs51/sdcdb.el $(DESTDIR)$(bindir)/sdcdb.el
62 cp $(PRJDIR)/debugger/mcs51/sdcdbsrc.el $(DESTDIR)$(bindir)/sdcdbsrc.el
65 # Deleting all the installed files
66 # --------------------------------
68 rm -f $(DESTDIR)$(bindir)/sdcdb$(EXEEXT)
69 rm -f $(DESTDIR)$(bindir)/sdcdb.el
70 rm -f $(DESTDIR)$(bindir)/sdcdbsrc.el
72 # Performing self-test
73 # --------------------
77 # Performing installation test
78 # ----------------------------
82 # Creating installation directories
83 # ---------------------------------
85 $(INSTALL) -d $(DESTDIR)$(bindir)
88 # Creating dependencies
89 # ---------------------
92 Makefile.dep: $(SOURCES) *.h $(PRJDIR)/*.h
93 $(CPP) $(CPPFLAGS) $(M_OR_MM) $(SOURCES) >Makefile.dep
100 $(TARGET): $(OBJECTS) $(SLIBOBJS)
101 $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(SLIBOBJS) $(LIBDIRS) $(LIBS)
104 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
106 $(SLIBOBJS):%.o:$(SLIB)/%.c
107 $(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