struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / sdas / linksrc / Makefile.in
blob77e61c5d18f4d776104d4ebb728d5e4ee065eee0
5 VERSION = @VERSION@
6 VERSIONHI = @VERSIONHI@
7 VERSIONLO = @VERSIONLO@
8 VERSIONP = @VERSIONP@
10 SHELL = /bin/sh
11 CC = @CC@
12 CPP = @CPP@
13 INSTALL = @INSTALL@
14 STRIP = @STRIP@
15 MAKEDEP = @MAKEDEP@
17 top_builddir = @top_builddir@
18 top_srcdir = @top_srcdir@
20 srcdir = @srcdir@
21 prefix = @prefix@
22 exec_prefix = @exec_prefix@
23 bindir = @bindir@
24 libdir = @libdir@
25 datadir = @datadir@
26 datarootdir = @datarootdir@
27 includedir = @includedir@
28 mandir = @mandir@
29 man1dir = $(mandir)/man1
30 man2dir = $(mandir)/man2
31 infodir = @info@
33 EXEEXT = @EXEEXT@
35 VPATH = @srcdir@
37 CPPFLAGS = @CPPFLAGS@ -I.. -I$(srcdir)/..
38 CFLAGS = @CFLAGS@ @WALL_FLAG@ -DINDEXLIB -DUNIX -I. -I$(srcdir)
39 LDFLAGS = @LDFLAGS@
41 OBJDIR = obj
43 ASXXLIB = $(srcdir)/../asxxsrc
45 ASXXLIBSRC = strcmpi.c
47 SRC = lk_readnl.c lkaomf51.c lkar.c lkarea.c lkdata.c lkelf.c lkeval.c \
48 lkhead.c lklex.c lklib.c lklibr.c lklist.c lkmain.c lkmem.c \
49 lknoice.c lkout.c lkrel.c lkrloc.c lkrloc3.c lksdcclib.c \
50 lksym.c sdld.c lksdcdb.c lkbank.c
52 LKSOURCES = $(SRC) $(ASXXLIBSRC:%.c=$(ASXXLIB)/%.c)
54 OBJS = $(SRC:%.c=$(OBJDIR)/%.o)
55 ASXXLIBOBJS = $(ASXXLIBSRC:%.c=$(OBJDIR)/%.o)
56 LKOBJECTS = $(OBJS) $(LKOBJS) $(ASXXLIBOBJS)
58 $(LKOBJECTS) : aslink.h
60 ASLINK = $(top_builddir)/bin/sdld$(EXEEXT)
62 transform = @program_transform_name@
64 # Compiling entire program or any subproject
65 # ------------------------------------------
66 all: sdcc-ld8051 sdcc-ldz80 sdcc-ldgb sdcc-ld6808 sdcc-ldstm8 sdcc-ldpdk sdcc-ldf8
68 sdcc-ld8051: checkconf $(ASLINK)
70 sdcc-ldz80: checkconf $(top_builddir)/bin/sdldz80$(EXEEXT)
72 sdcc-ldgb: checkconf $(top_builddir)/bin/sdldgb$(EXEEXT)
74 sdcc-ld6808: checkconf $(top_builddir)/bin/sdld6808$(EXEEXT)
76 sdcc-ldstm8: checkconf $(top_builddir)/bin/sdldstm8$(EXEEXT)
78 sdcc-ldf8: checkconf $(top_builddir)/bin/sdldf8$(EXEEXT)
80 sdcc-ldpdk: checkconf $(top_builddir)/bin/sdldpdk$(EXEEXT)
82 $(top_builddir)/bin/sdldz80$(EXEEXT) $(top_builddir)/bin/sdldgb$(EXEEXT) $(top_builddir)/bin/sdldstm8$(EXEEXT) $(top_builddir)/bin/sdld6808$(EXEEXT) $(top_builddir)/bin/sdldpdk$(EXEEXT) $(top_builddir)/bin/sdldf8$(EXEEXT): $(ASLINK)
83 cp -p $(ASLINK) $@
85 $(ASLINK): $(LKOBJECTS)
86 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(LKOBJECTS)
88 # Compiling and installing everything and running test
89 # ----------------------------------------------------
90 install: all installdirs
91 $(INSTALL) $(top_builddir)/bin/sdld$(EXEEXT) $(DESTDIR)$(bindir)/`echo 'sdld' | sed '$(transform)'`$(EXEEXT)
92 $(STRIP) $(DESTDIR)$(bindir)/`echo 'sdld' | sed '$(transform)'`$(EXEEXT)
93 if [ "`grep stm8 $(top_builddir)/ports.build`" = "stm8" ]; \
94 then \
95 $(INSTALL) $(top_builddir)/bin/sdldstm8$(EXEEXT) $(DESTDIR)$(bindir)/`echo 'sdldstm8' | sed '$(transform)'`$(EXEEXT); \
96 $(STRIP) $(DESTDIR)$(bindir)/`echo 'sdldstm8' | sed '$(transform)'`$(EXEEXT); \
98 if [ "`grep hc08 $(top_builddir)/ports.build`" = "hc08" ]; \
99 then \
100 $(INSTALL) $(top_builddir)/bin/sdld6808$(EXEEXT) $(DESTDIR)$(bindir)/`echo 'sdld6808' | sed '$(transform)'`$(EXEEXT); \
101 $(STRIP) $(DESTDIR)$(bindir)/`echo 'sdld6808' | sed '$(transform)'`$(EXEEXT); \
103 if [ "`grep z80 $(top_builddir)/ports.build`" = "z80" ]; \
104 then \
105 $(INSTALL) $(top_builddir)/bin/sdldz80$(EXEEXT) $(DESTDIR)$(bindir)/`echo 'sdldz80' | sed '$(transform)'`$(EXEEXT); \
106 $(STRIP) $(DESTDIR)$(bindir)/`echo 'sdldz80' | sed '$(transform)'`$(EXEEXT); \
107 $(INSTALL) $(top_builddir)/bin/sdldgb$(EXEEXT) $(DESTDIR)$(bindir)/`echo 'sdldgb' | sed '$(transform)'`$(EXEEXT); \
108 $(STRIP) $(DESTDIR)$(bindir)/`echo 'sdldgb' | sed '$(transform)'`$(EXEEXT); \
110 if [ "`grep pdk $(top_builddir)/ports.build`" = "pdk" ]; \
111 then \
112 $(INSTALL) $(top_builddir)/bin/sdldpdk$(EXEEXT) $(DESTDIR)$(bindir)/`echo 'sdldpdk' | sed '$(transform)'`$(EXEEXT); \
113 $(STRIP) $(DESTDIR)$(bindir)/`echo 'sdldpdk' | sed '$(transform)'`$(EXEEXT); \
115 if [ "`grep f8 $(top_builddir)/ports.build`" = "f8" ]; \
116 then \
117 $(INSTALL) $(top_builddir)/bin/sdldf8$(EXEEXT) $(DESTDIR)$(bindir)/`echo 'sdldf8' | sed '$(transform)'`$(EXEEXT); \
118 $(STRIP) $(DESTDIR)$(bindir)/`echo 'sdldf8' | sed '$(transform)'`$(EXEEXT); \
121 # Deleting all the installed files
122 # --------------------------------
123 uninstall:
124 for ld in $(top_builddir)/bin/sdld $(top_builddir)/bin/sdldz80 $(top_builddir)/bin/sdldgb $(top_builddir)/bin/sdldstm8 $(top_builddir)/bin/sdld6808 $(top_builddir)/bin/sdldpdk $(top_builddir)/bin/sdldf8; \
125 do \
126 rm -f $(DESTDIR)$(bindir)/`echo \`basename $$ld\` | sed '$(transform)'`$(EXEEXT); \
127 done
130 # Performing self-test
131 # --------------------
132 check:
135 # Performing installation test
136 # ----------------------------
137 installcheck:
140 # Creating installation directories
141 # ---------------------------------
142 installdirs:
143 $(INSTALL) -d $(DESTDIR)$(bindir)
146 # Creating dependencies
147 # ---------------------
148 SPECIAL = $(srcdir)/*.h
149 include $(srcdir)/clean.mk
151 # My rules
152 # --------
153 $(OBJDIR)/.stamp:
154 mkdir -p $(OBJDIR)
155 touch $(OBJDIR)/.stamp
157 $(OBJDIR)/%.o: %.c $(OBJDIR)/.stamp
158 $(CC) -c $(CFLAGS) -o $@ $<
160 $(OBJDIR)/%.o: $(ASXXLIB)/%.c $(OBJDIR)/.stamp
161 $(CC) -c $(CFLAGS) -o $@ $<
164 # Remaking configuration
165 # ----------------------
166 checkconf:
167 @if [ -f $(top_builddir)/devel ]; then\
168 $(MAKE) -f ../conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
171 # End of Makefile