6 VERSIONHI = @VERSIONHI@
7 VERSIONLO = @VERSIONLO@
24 exec_prefix = @exec_prefix@
28 includedir = @includedir@
30 man1dir = $(mandir)/man1
31 man2dir = $(mandir)/man2
34 STD_INC = @sdcc_include_dir@
35 CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) -I$(SLIB) -D_FORASXXXX_
38 LDFLAGS = @LDFLAGS@ @LIBS@
42 OBJECTS = cppalloc.o cpperror.o cppexp.o cpphash.o cpplib.o cppmain.o support.o
43 SOURCES = $(patsubst %.o,%.c,$(OBJECTS))
45 TARGET = $(PRJDIR)/bin/sdcppold
47 transform = @program_transform_name@
49 # Compiling entire program or any subproject
50 # ------------------------------------------
51 all: checkconf $(TARGET)
53 $(TARGET): $(SLIBOBJS) $(OBJECTS)
54 $(CC) $(LDFLAGS) -o $@ $(SLIBOBJS) $(OBJECTS)
56 # Compiling and installing everything and runing test
57 # ---------------------------------------------------
58 install: all installdirs
59 $(INSTALL) $(TARGET) `echo $(bindir)/sdcppold|sed '$(transform)'`
60 $(STRIP) `echo $(bindir)/sdcppold|sed '$(transform)'`
62 # Deleting all the installed files
63 # --------------------------------
65 rm -f $(bindir)/sdcppold
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
97 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
99 $(SLIBOBJS):%.o:$(SLIB)/%.c
100 $(CC) $(CFLAGS) $(CPPFLAGS) -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