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 SOURCES = $(patsubst %.o,%.c,$(OBJECTS))
42 TARGET = $(PRJDIR)/bin/sdcdb
45 # Compiling entire program or any subproject
46 # ------------------------------------------
47 all: checkconf $(TARGET)
49 $(PRJDIR)/support/gc/libgc.a:
50 cd $(PRJDIR)/support/gc && $(MAKE)
52 # Compiling and installing everything and runing test
53 # ---------------------------------------------------
54 install: all installdirs
55 $(INSTALL) -s $(TARGET) $(bindir)/sdcdb
56 cp $(PRJDIR)/sdcdb/sdcdb.el $(bindir)/sdcdb.el
57 cp $(PRJDIR)/sdcdb/sdcdbsrc.el $(bindir)/sdcdbsrc.el
60 # Deleting all the installed files
61 # --------------------------------
66 # Performing self-test
67 # --------------------
71 # Performing installation test
72 # ----------------------------
76 # Creating installation directories
77 # ---------------------------------
79 $(INSTALL) -d $(bindir)
82 # Creating dependencies
83 # ---------------------
86 Makefile.dep: $(SOURCES) *.h $(PRJDIR)/*.h
87 $(CPP) $(CPPFLAGS) $(M_OR_MM) $(SOURCES) >Makefile.dep
95 $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBDIRS) $(LIBS)
98 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
101 # Remaking configuration
102 # ----------------------
104 @if [ -f $(PRJDIR)/devel ]; then\
105 $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
108 # End of cpp/Makefile