Imported Upstream version 2.9.0
[debian/cc1111] / 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 datarootdir     = @datarootdir@
26 includedir      = @includedir@
27 mandir          = @mandir@
28 man1dir         = $(mandir)/man1
29 man2dir         = $(mandir)/man2
30 infodir         = @info@
31
32 EXEEXT          = @EXEEXT@
33
34 VPATH           = @srcdir@
35
36 CPPFLAGS        = @CPPFLAGS@ -I. -I$(srcdir)
37 CFLAGS          = @CFLAGS@ -Wall -DINDEXLIB -I. -I$(srcdir) -I$(srcdir)/../../support/Util
38 M_OR_MM         = @M_OR_MM@
39 LDFLAGS         = @LDFLAGS@
40
41 OBJDIR = obj
42
43 UTILLIB = $(srcdir)/../../support/Util
44 UTILSRC = dbuf.c dbuf_string.c
45 UTILLIBOBJS = $(UTILSRC:%.c=$(OBJDIR)/%.o)
46
47 ASXXLIB = $(srcdir)/../asxxsrc
48 ASXXLIBSRC = strcmpi.c assym.c aslex.c asnoice.c
49 ASXXLIBOBJS = $(ASXXLIBSRC:%.c=$(OBJDIR)/%.o)
50
51 SRC = asmain.c assubr.c \
52       asexpr.c asdata.c aslist.c asout.c \
53       i51ext.c i51pst.c i51mch.c i51adr.c
54 OBJS = $(SRC:%.c=$(OBJDIR)/%.o)
55
56 ASSOURCES = $(SRC) $(ASXXLIBSRC:%.c=$(ASXXLIB)/%.c) $(UTILSRC:%.c=$(UTILLIB)/%.c)
57
58 ASOBJECTS = $(OBJS) $(ASXXLIBOBJS) $(UTILLIBOBJS)
59
60 ASX = $(top_builddir)/bin/asx8051$(EXEEXT)
61 DEST = $(DESTDIR)$(bindir)/asx8051$(EXEEXT)
62
63 transform       = @program_transform_name@
64
65 # Compiling entire program or any subproject
66 # ------------------------------------------
67 all: checkconf $(ASX)
68
69 $(ASX): $(ASOBJECTS)
70         $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(ASOBJECTS)
71
72 # Compiling and installing everything and running test
73 # ----------------------------------------------------
74 install: all installdirs
75         $(INSTALL) $(ASX) `echo $(DEST)|sed '$(transform)'`
76         $(STRIP) `echo $(DEST)|sed '$(transform)'`
77
78 # Deleting all the installed files
79 # --------------------------------
80 uninstall:
81         rm -f $(DEST)
82
83
84 # Performing self-test
85 # --------------------
86 check:
87
88
89 # Performing installation test
90 # ----------------------------
91 installcheck:
92
93
94 # Creating installation directories
95 # ---------------------------------
96 installdirs:
97         $(INSTALL) -d $(DESTDIR)$(bindir)
98
99
100 # Creating dependencies
101 # ---------------------
102 dep: Makefile.dep
103
104 Makefile.dep: $(ASSOURCES) $(srcdir)/*.h
105         $(CPP) $(CPPFLAGS) $(M_OR_MM) $(filter %.c,$^) >Makefile.dep
106
107 ifeq "$(findstring $(MAKECMDGOALS),uninstall check installcheck installdirs \
108                                    clean distclean mostlyclean realclean)" ""
109   -include Makefile.dep
110 endif
111 include $(srcdir)/clean.mk
112
113 # My rules
114 # --------
115 $(OBJDIR)/.stamp:
116         mkdir -p $(OBJDIR)
117         touch $(OBJDIR)/.stamp
118
119 $(OBJDIR)/%.o: %.c $(OBJDIR)/.stamp
120         $(CC) -c $(CFLAGS) -o $@ $<
121
122 $(OBJDIR)/%.o: $(ASXXLIB)/%.c $(OBJDIR)/.stamp
123         $(CC) -c $(CFLAGS) -o $@ $<
124
125 $(OBJDIR)/%.o: $(UTILLIB)/%.c $(OBJDIR)/.stamp
126         $(CC) -c $(CFLAGS) -o $@ $<
127
128
129 # Remaking configuration
130 # ----------------------
131 checkconf:
132         @if [ -f $(top_builddir)/devel ]; then\
133           $(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
134         fi
135
136 # End of Makefile