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) -D_FORASXXXX_
35 OBJECTS = cppalloc.o cpperror.o cppexp.o cpphash.o cpplib.o cppmain.o support.o
36 SOURCES = $(patsubst %.o,%.c,$(OBJECTS))
38 TARGET = $(PRJDIR)/bin/sdcpp
41 # Compiling entire program or any subproject
42 # ------------------------------------------
43 all: checkconf $(TARGET)
46 $(CC) $(LDFLAGS) -o $@ $(OBJECTS)
48 # Compiling and installing everything and runing test
49 # ---------------------------------------------------
50 install: all installdirs
51 $(INSTALL) -s $(TARGET) $(bindir)/sdcpp
54 # Deleting all the installed files
55 # --------------------------------
60 # Performing self-test
61 # --------------------
65 # Performing installation test
66 # ----------------------------
70 # Creating installation directories
71 # ---------------------------------
73 $(INSTALL) -d $(bindir)
76 # Creating dependencies
77 # ---------------------
80 Makefile.dep: $(SOURCES) *.h $(PRJDIR)/*.h
81 $(CPP) $(CPPFLAGS) $(M_OR_MM) $(SOURCES) >Makefile.dep
89 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
92 # Remaking configuration
93 # ----------------------
95 @if [ -f $(PRJDIR)/devel ]; then\
96 $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\