Add support for cleanup functions
[bcusdk.git] / bcu / lib / Makefile.am
blobf8e641854567a60716a46ff267277af0f088a5b4
1 include ../VARIANT
3 AS=@TAS@
4 LD=@TLD@
5 AR=@TAR@
6 RANLIB=@TRANLIB@
7 CC=@TGCC@
8 CCAS=@TGCC@
9 AM_CPPFLAGS=-I$(top_srcdir)/bcu/include
10 AM_CFLAGS=-gstabs -O3 -Os
11 CFLAGS=
12 EXTRA_DIST=eewrite.c
14 tlibdir=$(pkglibdir)/lib
16 tlib_LIBRARIES=libbcu_0012.a libbcu_0020.a
18 COMMON=regs.s tmp.s fp.s tmpspace.s
19 BCU1=initbcu1.s bcu1func.s
20 BCU2=initbcu2.s bcu2func.s
21 BCU1_EE=gen/eewrite_QI.c gen/eewrite_HI.c gen/eewrite_AI.c gen/eewrite_SI.c \
22         gen/eewrite_FI.c gen/eewrite_CI.c gen/eewrite_EI.c gen/eewrite_DI.c
24 BUILT_SOURCES=$(BCU1_EE)
25 CLEANFILES=$(BCU1_EE)
27 libbcu_0012_a_SOURCES=$(BCU1) $(COMMON) $(BCU1_EE)
28 libbcu_0020_a_SOURCES=$(BCU2) $(COMMON) $(BCU1_EE)
30 gen/eewrite_%.c : Makefile
31         mkdir -p gen
32         echo "#define MODE " `basename $@|sed -e s/eewrite_//g |sed -e s/.c//g` > $@ 
33         echo "#include \"eewrite.c\"" >> $@
35 install-data-hook:
36         $(mkinstalldirs) $(DESTDIR)$(tlibdir)
37         for a in $(addprefix lib,$(addsuffix .a,$(BCU_LIST))) ; do $(top_srcdir)/bcu/addmissing.sh $(DESTDIR)$(tlibdir) $$a; done