struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / main_in.mk
blob9cde86031c5f3bc1842fe0327e26a4246f5b98b9
5 # Version
6 VERSION = @VERSION@
7 VERSIONHI = @VERSIONHI@
8 VERSIONLO = @VERSIONLO@
9 VERSIONP = @VERSIONP@
11 # Programs
12 SHELL = /bin/sh
13 CC = @CC@
14 CPP = @CPP@
15 RANLIB = @RANLIB@
16 INSTALL = @INSTALL@
17 AUTOCONF = @AUTOCONF@
19 # Directories
20 PRJDIR = .
22 prefix = @prefix@
23 exec_prefix = @exec_prefix@
24 bindir = @bindir@
25 libdir = @libdir@
26 datadir = @datadir@
27 datarootdir = @datarootdir@
28 includedir = @includedir@
29 mandir = @mandir@
30 man1dir = $(mandir)/man1
31 man2dir = $(mandir)/man2
32 infodir = @infodir@
33 srcdir = @srcdir@
35 # Flags
36 DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@)
37 CPPFLAGS = @CPPFLAGS@ -I$(PRJDIR)
38 CFLAGS = @CFLAGS@
41 # Compiling entire program or any subproject
42 # ------------------------------------------
43 all: checkconf
46 # Compiling and installing everything and runing test
47 # ---------------------------------------------------
48 install: all installdirs
51 # Deleting all the installed files
52 # --------------------------------
53 uninstall:
56 # Performing self-test
57 # --------------------
58 check:
61 # Performing installation test
62 # ----------------------------
63 installcheck:
66 # Creating installation directories
67 # ---------------------------------
68 installdirs:
71 # Creating dependencies
72 # ---------------------
73 dep:
75 include $(srcdir)/clean.mk
77 # My rules
78 # --------
79 .c.o:
80 $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
82 .y.c:
83 rm -f $*.cc $*.h
84 $(YACC) -d $<
85 mv y.tab.c $*.cc
86 mv y.tab.h $*.h
88 .l.c:
89 rm -f $*.cc
90 $(LEX) -t $< >$*.cc
93 # Remaking configuration
94 # ----------------------
95 checkconf:
96 @if [ -f $(PRJDIR)/devel ]; then\
97 $(MAKE) -f $(srcdir)/conf.mk srcdir="$(srcdir)" freshconf;\
100 # End of main_in.mk/main.mk