6 VERSIONHI = @VERSIONHI@
7 VERSIONLO = @VERSIONLO@
16 SLIB = $(PRJDIR)/support/Util
20 exec_prefix = @exec_prefix@
24 includedir = @includedir@
26 man1dir = $(mandir)/man1
27 man2dir = $(mandir)/man2
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
68 # Performing self-test
69 # --------------------
73 # Performing installation test
74 # ----------------------------
78 # Creating installation directories
79 # ---------------------------------
81 $(INSTALL) -d $(bindir)
84 # Creating dependencies
85 # ---------------------
88 Makefile.dep: $(SOURCES) *.h $(PRJDIR)/*.h
89 $(CPP) $(CPPFLAGS) $(M_OR_MM) $(SOURCES) >Makefile.dep
96 $(TARGET): $(OBJECTS) $(SLIBOBJS)
97 $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(SLIBOBJS) $(LIBDIRS) $(LIBS)
100 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
102 $(SLIBOBJS):%.o:$(SLIB)/%.c
103 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
105 # Remaking configuration
106 # ----------------------
108 @if [ -f $(PRJDIR)/devel ]; then\
109 $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
112 # End of cpp/Makefile