42e5f995e4cdc726fb78ee8fe32ddd64f33fc2b9
[fw/sdcc] / as / mcs51 / 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 STRIP           = @STRIP@
15
16 top_builddir    = @top_builddir@
17 top_srcdir      = @top_srcdir@
18
19 srcdir          = @srcdir@
20 prefix          = @prefix@
21 exec_prefix     = @exec_prefix@
22 bindir          = @bindir@
23 libdir          = @libdir@
24 datadir         = @datadir@
25 includedir      = @includedir@
26 mandir          = @mandir@
27 man1dir         = $(mandir)/man1
28 man2dir         = $(mandir)/man2
29 infodir         = @info@
30
31 EXEEXT          = @EXEEXT@
32
33 VPATH           = @srcdir@
34
35 CPPFLAGS        = @CPPFLAGS@ -I. -I$(srcdir)
36 CFLAGS          = @CFLAGS@ -Wall -DINDEXLIB
37 M_OR_MM         = @M_OR_MM@
38 LDFLAGS         = @LDFLAGS@
39
40 ASOBJECTS       = asmain.o aslex.o assym.o assubr.o asnoice.o \
41                   asexpr.o asdata.o aslist.o asout.o asstore.o \
42                   i51ext.o i51pst.o i51mch.o i51adr.o strcmpi.o
43 ASSOURCES       = $(patsubst %.o,%.c,$(ASOBJECTS))
44
45 ASX8051         = $(top_builddir)bin/asx8051$(EXEEXT)
46
47 transform       = @program_transform_name@
48
49 # Compiling entire program or any subproject
50 # ------------------------------------------
51 all: checkconf $(ASX8051)
52
53 $(ASX8051): $(ASOBJECTS)
54         $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(ASOBJECTS)
55
56 # Compiling and installing everything and running test
57 # ----------------------------------------------------
58 install: all installdirs
59         $(INSTALL) $(ASX8051) `echo $(DESTDIR)$(bindir)/asx8051$(EXEEXT)|sed '$(transform)'`
60         $(STRIP) `echo $(DESTDIR)$(bindir)/asx8051$(EXEEXT)|sed '$(transform)'`
61
62 # Deleting all the installed files
63 # --------------------------------
64 uninstall:
65         rm -f $(DESTDIR)$(bindir)/asx8051$(EXEEXT)
66
67
68 # Performing self-test
69 # --------------------
70 check:
71
72
73 # Performing installation test
74 # ----------------------------
75 installcheck:
76
77
78 # Creating installation directories
79 # ---------------------------------
80 installdirs:
81         $(INSTALL) -d $(DESTDIR)$(bindir)
82
83
84 # Creating dependencies
85 # ---------------------
86 dep: Makefile.dep
87
88 Makefile.dep: $(ASSOURCES) $(srcdir)/*.h $(top_builddir)*.h $(top_srcdir)/*.h
89         $(CPP) $(CPPFLAGS) $(M_OR_MM) $(filter %.c,$^) >Makefile.dep
90
91 ifeq "$(findstring $(MAKECMDGOALS),uninstall check installcheck installdirs \
92                                    clean distclean mostlyclean realclean)" ""
93   include Makefile.dep
94 endif
95 include $(srcdir)/clean.mk
96
97 # My rules
98 # --------
99 .c.o:
100         $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
101
102
103 # Remaking configuration
104 # ----------------------
105 checkconf:
106         @if [ -f $(top_builddir)devel ]; then\
107           $(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
108         fi
109
110 # End of Makefile