* Added support for mingw32.
[fw/sdcc] / support / cpp / Makefile.in
1 #
2 #
3 #
4
5 VERSION         = @VERSION@
6 VERSIONHI       = @VERSIONHI@
7 VERSIONLO       = @VERSIONLO@
8 VERSIONP        = @VERSIONP@
9
10 SHELL           = /bin/sh
11 CC              = @CC@
12 CPP             = @CPP@
13 INSTALL         = @INSTALL@
14
15 PRJDIR          = ../..
16
17 srcdir          = @srcdir@
18 prefix          = @prefix@
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
28
29 STD_INC         = @sdcc_include_dir@
30 CPPFLAGS        = @CPPFLAGS@ -I. -I$(PRJDIR) -D_FORASXXXX_
31 CFLAGS          = @CFLAGS@
32 M_OR_MM         = @M_OR_MM@
33 LDFLAGS         = @LDFLAGS@
34
35 OBJECTS         = cppalloc.o cpperror.o cppexp.o cpphash.o cpplib.o cppmain.o support.o
36 SOURCES         = $(patsubst %.o,%.c,$(OBJECTS))
37
38 TARGET          = $(PRJDIR)/bin/sdcpp
39
40
41 # Compiling entire program or any subproject
42 # ------------------------------------------
43 all: checkconf $(TARGET)
44
45 $(TARGET): $(OBJECTS)
46         $(CC) $(LDFLAGS) -o $@ $(OBJECTS)
47
48 # Compiling and installing everything and runing test
49 # ---------------------------------------------------
50 install: all installdirs
51         $(INSTALL) -s $(TARGET) $(bindir)/sdcpp
52
53
54 # Deleting all the installed files
55 # --------------------------------
56 uninstall:
57         rm -f $(bindir)/sdcpp
58
59
60 # Performing self-test
61 # --------------------
62 check:
63
64
65 # Performing installation test
66 # ----------------------------
67 installcheck:
68
69
70 # Creating installation directories
71 # ---------------------------------
72 installdirs:
73         $(INSTALL) -d $(bindir)
74
75
76 # Creating dependencies
77 # ---------------------
78 dep: Makefile.dep
79
80 Makefile.dep: $(SOURCES) *.h $(PRJDIR)/*.h
81         $(CPP) $(CPPFLAGS) $(M_OR_MM) $(SOURCES) >Makefile.dep
82
83 include Makefile.dep
84 include clean.mk
85
86 # My rules
87 # --------
88 .c.o:
89         $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
90
91
92 # Remaking configuration
93 # ----------------------
94 checkconf:
95         @if [ -f $(PRJDIR)/devel ]; then\
96           $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
97         fi
98
99 # End of cpp/Makefile