2 # Makefile.in for ahi.device.
8 ########################################
14 top_srcdir
= @top_srcdir@
18 DEVSDIR
= ${DISTDIR}/User
/Devs
19 CATDIR
= ${DISTDIR}/User
/Catalogs
20 CATSRCDIR
= ${DISTDIR}/Developer
/Translations
30 STRIP
= @STRIP@ @STRIPFLAGS@
32 CPPFLAGS
= @CPPFLAGS@
-I
${top_srcdir} -I
${srcdir}
35 LDFLAGS
= @LDFLAGS@
-nostartfiles
43 EXECUTABLE
= ahi.device
46 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
47 INSTALL_DATA
= @INSTALL_DATA@
50 SFDC_TARGET
= --target
=${host}
54 ifeq ($(strip $(FLEXCAT
)),)
55 FLEXCAT
= @echo
'FlexCat not found; cannot make $@!'; false \
#
58 ENABLE_WARPUP
= @ENABLE_WARPUP@
62 ########################################
64 LANGUAGES
= $(basename $(shell cd
${srcdir}/translations
; for file in
*.ct
; do if
[ -f
$$file ]; then printf
"%s" "$$file "; fi
; done
))
65 CATALOGS
= $(addsuffix .catalog
, $(LANGUAGES
))
67 OBJECTS
= header.o gateway.o gatestubs.o \
68 device.o devcommands.o devsupp.o \
69 localize.o modeinfo.o requester.o database.o debug.o\
70 audioctrl.o effectinit.o sound.o misc.o dspecho.o \
73 ifeq ($(ENABLE_WARPUP
),yes
)
74 OBJECTS
+= elfloader.o warpup.o
77 ifeq ($(host_cpu
)-$(host-os
),m68k-amigaos
)
78 OBJECTS
+= addroutines_68k.o dspechofuncs_68k.o
81 #ifeq ($(host_cpu),powerpc)
82 #OBJECTS += addroutines_ppc.o
85 GENERATED
= version.h \
86 gatestubs.c gatestubs.h
90 ########################################
92 .PHONY
: all mostlyclean clean distclean maintainer-clean\
93 install revup bindist bindist-install
96 all: $(EXECUTABLE
) $(srcdir)/ahi.ct
$(CATALOGS
)
99 $(RM
) $(EXECUTABLE
) *.o
*.a Makefile.dep
102 $(RM
) $(CATALOGS
) $(GENERATED
)
107 maintainer-clean
: distclean
110 $(INSTALL
) -d
$(PREFIX
)/Devs
111 $(INSTALL_PROGRAM
) $(EXECUTABLE
) $(PREFIX
)/Devs
/$(EXECUTABLE
)
112 for i in
$(LANGUAGES
); do \
113 $(INSTALL
) -d
$(PREFIX
)/Locale
/Catalogs
/$$i; \
114 $(INSTALL_DATA
) $$i.catalog
$(PREFIX
)/Locale
/Catalogs
/$$i/ahi.catalog
; \
119 @rev
=`cat $(srcdir)/version.rev` && echo
`expr $$rev + 1` > $(srcdir)/version.rev
120 @date
+%d.
%m.
%y
> $(srcdir)/version.date
121 @echo
-n
"New revision: "
122 @cat
$(srcdir)/version.rev
125 $(INSTALL
) -d
$(CATDIR
) $(CATSRCDIR
) $(CATSRCDIR
)/ahi
126 $(INSTALL_DATA
) ${srcdir}/ahi.cd
$(CATSRCDIR
)
127 $(INSTALL_DATA
) ${srcdir}/ahi.ct
$(CATSRCDIR
)
128 for i in
$(LANGUAGES
); do \
129 $(INSTALL
) -d
$(CATDIR
)/$$i; \
130 $(INSTALL_DATA
) $$i.catalog
$(CATDIR
)/$$i/ahi.catalog
; \
131 $(INSTALL_DATA
) ${srcdir}/translations
/$$i.ct \
132 $(CATSRCDIR
)/ahi
/$$i.ct
; \
135 $(INSTALL
) -d
$(DEVSDIR
)
137 $(INSTALL_PROGRAM
) $(EXECUTABLE
) $(DEVSDIR
)/$(EXECUTABLE
)
138 $(STRIP
) $(DEVSDIR
)/$(EXECUTABLE
)
142 # Auto-remake autoconf stuff
143 ########################################
145 Makefile
: Makefile.in ..
/config.status
146 (cd ..
&& .
/config.status
)
151 ########################################
154 $(AS
) $(ASFLAGS
) $< -o
$@
156 $(EXECUTABLE
): $(OBJECTS
) libaddroutines.a
157 $(CC
) $(LDFLAGS
) $^
$(LIBS
) -o
$@
159 libaddroutines.a
: addroutines_hifi.o addroutines_lofi.o \
160 addroutines_32bit.o addroutines_71.o dspechofuncs.o
161 $(AR
) $(ARFLAGS
) $@
$^
164 version.h
: version.rev version.date
166 @ver
=`cat $(top_srcdir)/version.ver` \
167 rev
=`cat $(srcdir)/version.rev` \
168 date
=`cat $(srcdir)/version.date` && \
169 echo
"#define VERSION $$ver" > $@
&& \
170 echo
"#define REVISION $$rev" >> $@
&& \
171 echo
"#define VERS \"$$ver.$$rev ($$date)\"" >> $@
173 gatestubs.c
: $(top_srcdir
)/Include
/SFD
/ahi_lib.sfd
174 $(SFDC
) $(SFDC_TARGET
) --mode
=gatestubs
$^
--output
$@ \
175 --gateprefix
=gw
--libprefix
=_
--libarg
=last
--addvectors
=device
177 gatestubs.h
: $(top_srcdir
)/Include
/SFD
/ahi_lib.sfd
178 $(SFDC
) $(SFDC_TARGET
) --mode
=gateproto
$^
--output
$@ \
179 --gateprefix
=gw
--libprefix
=_
--libarg
=last
--addvectors
=device
181 $(srcdir)/localize.c
: ahi.cd C_c_AHI.sd
182 $(FLEXCAT
) $(srcdir)/ahi.cd
$(srcdir)/localize.c
=$(srcdir)/C_c_AHI.sd
184 $(srcdir)/localize.h
: ahi.cd C_c_AHI.sd
185 $(FLEXCAT
) $(srcdir)/ahi.cd
$(srcdir)/localize.h
=$(srcdir)/C_h_AHI.sd
187 %.catalog
: translations
/%.ct
189 $(srcdir)/ahi.cd
$< CATALOG
=$@
192 $(FLEXCAT
) $(srcdir)/ahi.cd
$@ NEWCTFILE
=$@
194 # Just some test code...
196 elftest
: elftest.o elfloader.o
197 $(CC
) $^
$(LIBS
) -o
$@
202 ########################################
204 SOURCES
= $(wildcard $(srcdir)/*.c
)
205 HEADERS
= $(wildcard $(srcdir)/*.h
)
207 #DEPENDENCIES = $(SOURCES) $(HEADERS)
215 Makefile.dep
: $(DEPENDENCIES
) $(GENERATED
)
217 -@
$(CC
) $(CPPFLAGS
) $(CFLAGS
) -MM
$(SOURCES
) > $@
221 addroutines_ppc.o
: addroutines_ppc.s
222 addroutines_68k.o
: addroutines_68k.s
223 dspechofuncs_68k.o
: dspechofuncs_68k.s
225 $(wildcard $(srcdir)/translations
/*.ct
) $(srcdir)/ahi.ct
: ahi.cd