6 VERSIONHI = @VERSIONHI@
7 VERSIONLO = @VERSIONLO@
23 exec_prefix = ${prefix}
24 bindir = ${exec_prefix}/bin
25 libdir = ${exec_prefix}/lib
26 datadir = ${prefix}/share
27 includedir = ${prefix}/include
28 mandir = ${prefix}/man
29 man1dir = $(mandir)/man1
30 man2dir = $(mandir)/man2
31 infodir = ${prefix}/info
33 STD_INC = @sdcc_include_dir@
34 CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) -I$(SLIB) -D_FORASXXXX_
41 OBJECTS = cppalloc.o cpperror.o cppexp.o cpphash.o cpplib.o cppmain.o support.o
42 SOURCES = $(patsubst %.o,%.c,$(OBJECTS))
44 TARGET = $(PRJDIR)/bin/sdcpp
47 # Compiling entire program or any subproject
48 # ------------------------------------------
49 all: checkconf $(TARGET)
51 $(TARGET): $(SLIBOBJS) $(OBJECTS)
52 $(CC) $(LDFLAGS) -o $@ $(SLIBOBJS) $(OBJECTS)
54 # Compiling and installing everything and runing test
55 # ---------------------------------------------------
56 install: all installdirs
57 $(INSTALL) -s $(TARGET) $(bindir)/sdcpp
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) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
97 $(SLIBOBJS):%.o:$(SLIB)/%.c
98 $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
100 # Remaking configuration
101 # ----------------------
103 @if [ -f $(PRJDIR)/devel ]; then\
104 $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
107 # End of cpp/Makefile