Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / devs / AHI / Device / Makefile.in
blobed5afc8f2542998c82556d82a71cdae0243d8b46
2 # Makefile.in for ahi.device.
7 # Autoconfig stuff
8 ########################################
10 @SET_MAKE@
12 VPATH = @srcdir@
14 top_srcdir = @top_srcdir@
15 srcdir = @srcdir@
16 PREFIX = @prefix@
17 DISTDIR = @DISTDIR@
18 DEVSDIR = ${DISTDIR}/User/Devs
19 CATDIR = ${DISTDIR}/User/Catalogs
20 CATSRCDIR = ${DISTDIR}/Developer/Translations
22 build_os = @build_os@
23 host = @host@
24 host_cpu = @host_cpu@
26 CC = @CC@
27 AS = @AS@
28 AR = @AR@
29 RANLIB = @RANLIB@
30 STRIP = @STRIP@ @STRIPFLAGS@
32 CPPFLAGS = @CPPFLAGS@ -I${top_srcdir} -I${srcdir}
33 CFLAGS = @CFLAGS@
34 ASFLAGS = @ASFLAGS@
35 LDFLAGS = @LDFLAGS@ -nostartfiles
36 ifeq (@host_os@,aros)
37 LDFLAGS += -static
38 endif
39 ARFLAGS = @ARFLAGS@
41 LIBS = -lamiga
43 EXECUTABLE = ahi.device
45 INSTALL = @INSTALL@
46 INSTALL_PROGRAM = @INSTALL_PROGRAM@
47 INSTALL_DATA = @INSTALL_DATA@
49 SFDC = @SFDC@
50 SFDC_TARGET = --target=${host}
52 FLEXCAT = @FLEXCAT@
54 ifeq ($(strip $(FLEXCAT)),)
55 FLEXCAT = @echo 'FlexCat not found; cannot make $@!'; false \#
56 endif
58 ENABLE_WARPUP = @ENABLE_WARPUP@
61 # Files
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 \
71 mixer.o
73 ifeq ($(ENABLE_WARPUP),yes)
74 OBJECTS += elfloader.o warpup.o
75 endif
77 ifeq ($(host_cpu)-$(host-os),m68k-amigaos)
78 OBJECTS += addroutines_68k.o dspechofuncs_68k.o
79 endif
81 #ifeq ($(host_cpu),powerpc)
82 #OBJECTS += addroutines_ppc.o
83 #endif
85 GENERATED = version.h \
86 gatestubs.c gatestubs.h
89 # Targets
90 ########################################
92 .PHONY: all mostlyclean clean distclean maintainer-clean\
93 install revup bindist bindist-install
96 all: $(EXECUTABLE) $(srcdir)/ahi.ct $(CATALOGS)
98 mostlyclean:
99 $(RM) $(EXECUTABLE) *.o *.a Makefile.dep
101 clean: mostlyclean
102 $(RM) $(CATALOGS) $(GENERATED)
104 distclean: clean
105 $(RM) Makefile
107 maintainer-clean: distclean
109 install: all
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; \
115 done
118 revup:
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
124 bindist: all
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; \
133 done
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)
150 # Rules
151 ########################################
153 %.o: %.s
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) $@ $^
162 $(RANLIB) $@
164 version.h: version.rev version.date
165 @echo Creating $@
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
188 $(FLEXCAT) \
189 $(srcdir)/ahi.cd $< CATALOG=$@
191 %.ct:
192 $(FLEXCAT) $(srcdir)/ahi.cd $@ NEWCTFILE=$@
194 # Just some test code...
196 elftest: elftest.o elfloader.o
197 $(CC) $^ $(LIBS) -o $@
201 # Dependencies
202 ########################################
204 SOURCES = $(wildcard $(srcdir)/*.c)
205 HEADERS = $(wildcard $(srcdir)/*.h)
207 #DEPENDENCIES = $(SOURCES) $(HEADERS)
209 .PHONY: depend
211 depend:
212 $(RM) Makefile.dep
213 $(MAKE) Makefile.dep
215 Makefile.dep: $(DEPENDENCIES) $(GENERATED)
216 @echo Making $@
217 -@$(CC) $(CPPFLAGS) $(CFLAGS) -MM $(SOURCES) > $@
219 include Makefile.dep
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