]> git.gag.com Git - fw/sdcc/blob - main_in.mk
promote operand instead of result for +-*
[fw/sdcc] / main_in.mk
1 #
2 #
3 #
4
5 # Version
6 VERSION         = @VERSION@
7 VERSIONHI       = @VERSIONHI@
8 VERSIONLO       = @VERSIONLO@
9 VERSIONP        = @VERSIONP@
10
11 # Programs
12 SHELL           = /bin/sh
13 CC              = @CC@
14 CPP             = @CPP@
15 RANLIB          = @RANLIB@
16 INSTALL         = @INSTALL@
17 AUTOCONF        = @AUTOCONF@
18
19 # Directories
20 PRJDIR          = .
21
22 prefix          = @prefix@
23 exec_prefix     = @exec_prefix@
24 bindir          = @bindir@
25 libdir          = @libdir@
26 datadir         = @datadir@
27 includedir      = @includedir@
28 mandir          = @mandir@
29 man1dir         = $(mandir)/man1
30 man2dir         = $(mandir)/man2
31 infodir         = @infodir@
32 srcdir          = @srcdir@
33
34 # Flags
35 DEFS            = $(subs -DHAVE_CONFIG_H,,@DEFS@)
36 CPPFLAGS        = @CPPFLAGS@ -I$(PRJDIR)
37 CFLAGS          = @CFLAGS@
38 M_OR_MM         = @M_OR_MM@
39
40
41 # Compiling entire program or any subproject
42 # ------------------------------------------
43 all: checkconf
44
45
46 # Compiling and installing everything and runing test
47 # ---------------------------------------------------
48 install: all installdirs
49
50
51 # Deleting all the installed files
52 # --------------------------------
53 uninstall:
54
55
56 # Performing self-test
57 # --------------------
58 check:
59
60
61 # Performing installation test
62 # ----------------------------
63 installcheck:
64
65
66 # Creating installation directories
67 # ---------------------------------
68 installdirs:
69
70
71 # Creating dependencies
72 # ---------------------
73 dep: #main.dep
74
75 #main.dep: *.c *.h
76 #       $(CPP) $(CPPFLAGS) $(M_OR_MM) *.c >main.dep
77
78 #include main.dep
79 include clean.mk
80
81 # My rules
82 # --------
83 .c.o:
84         $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
85
86 .y.c:
87         rm -f $*.cc $*.h
88         $(YACC) -d $<
89         mv y.tab.c $*.cc
90         mv y.tab.h $*.h
91
92 .l.c:
93         rm -f $*.cc
94         $(LEX) -t $< >$*.cc
95
96
97 # Remaking configuration
98 # ----------------------
99 checkconf:
100         @if [ -f $(PRJDIR)/devel ]; then\
101           $(MAKE) -f $(srcdir)/conf.mk srcdir="$(srcdir)" freshconf;\
102         fi
103
104 # End of main_in.mk/main.mk
105