6 VERSIONHI = @VERSIONHI@
7 VERSIONLO = @VERSIONLO@
19 exec_prefix = ${prefix}
20 bindir = ${exec_prefix}/bin
21 libdir = ${exec_prefix}/lib
22 datadir = ${prefix}/share
23 includedir = ${prefix}/include
24 mandir = ${prefix}/man
25 man1dir = $(mandir)/man1
26 man2dir = $(mandir)/man2
27 infodir = ${prefix}/info
29 STD_INC = @sdcc_include_dir@
30 CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) -I$(PRJDIR)/support
35 LIBDIRS = -L$(PRJDIR)/support/gc
38 OBJECTS = sdcdb.o symtab.o simi.o $(PRJDIR)/src/SDCCset.o \
39 break.o cmd.o $(PRJDIR)/src/SDCChasht.o \
40 $(PRJDIR)/src/SDCCerr.o
41 SOURCES = $(patsubst %.o,%.c,$(OBJECTS))
43 TARGET = $(PRJDIR)/bin/sdcdb
46 # Compiling entire program or any subproject
47 # ------------------------------------------
48 all: checkconf $(TARGET)
50 $(PRJDIR)/support/gc/libgc.a:
51 cd $(PRJDIR)/support/gc && $(MAKE)
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 # --------------------------------
67 # Performing self-test
68 # --------------------
72 # Performing installation test
73 # ----------------------------
77 # Creating installation directories
78 # ---------------------------------
80 $(INSTALL) -d $(bindir)
83 # Creating dependencies
84 # ---------------------
87 Makefile.dep: $(SOURCES) *.h $(PRJDIR)/*.h
88 $(CPP) $(CPPFLAGS) $(M_OR_MM) $(SOURCES) >Makefile.dep
96 $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBDIRS) $(LIBS)
99 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
102 # Remaking configuration
103 # ----------------------
105 @if [ -f $(PRJDIR)/devel ]; then\
106 $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
109 # End of cpp/Makefile