6 # Make a linker library with stubs, if for some reason one can't use
7 # inline headers. This requires two arguments on "make" commandline:
9 # INCBASE: base name of includes (muimaster for MUI etc).
10 # LIBBASE: base name of library (mui for MUI etc).
12 .PHONY
: all clean clobber
14 all: lib
$(LIBBASE
).a libb
/lib
$(LIBBASE
).a libb32
/libm020
/lib
$(LIBBASE
).a
18 lib
$(LIBBASE
).a
: $(INCBASE
).asm
19 $(AWK
) -f
$(srcdir)/splitasm.awk
$(INCBASE
).asm
21 $(RM
) *.s
$(INCBASE
).asm lib
$(LIBBASE
).a
22 $(AR
) r lib
$(LIBBASE
).a
*.o
23 $(RANLIB
) lib
$(LIBBASE
).a
26 libb
/lib
$(LIBBASE
).a
: $(INCBASE
)b.asm
27 $(AWK
) -f
$(srcdir)/splitasm.awk
$(INCBASE
)b.asm
28 $(CC
) -fbaserel
-c
*.s
29 if
[ -d libb
] ; then true
; else mkdir libb
; fi
30 $(RM
) *.s
$(INCBASE
)b.asm libb
/lib
$(LIBBASE
).a
31 $(AR
) r libb
/lib
$(LIBBASE
).a
*.o
32 $(RANLIB
) libb
/lib
$(LIBBASE
).a
35 libb32
/libm020
/lib
$(LIBBASE
).a
: $(INCBASE
)b32.asm
36 $(AWK
) -f
$(srcdir)/splitasm.awk
$(INCBASE
)b32.asm
37 $(CC
) -m68020
-fbaserel32
-c
*.s
38 if
[ -d libb32
] ; then true
; else mkdir libb32
; fi
39 if
[ -d libb32
/libm020
] ; then true
; else mkdir libb32
/libm020
; fi
40 $(RM
) *.s
$(INCBASE
)b32.asm libb32
/libm020
/lib
$(LIBBASE
).a
41 $(AR
) r libb32
/libm020
/lib
$(LIBBASE
).a
*.o
42 $(RANLIB
) libb32
/libm020
/lib
$(LIBBASE
).a
45 $(INCBASE
).asm
: $(INCBASE
).c
46 $(CC
) -I
$(srcdir)/..
/include-src
-O2
-fomit-frame-pointer
-S
$(INCBASE
).c
-o
$(INCBASE
).asm
48 $(INCBASE
)b.asm
: $(INCBASE
).c
49 $(CC
) -I
$(srcdir)/..
/include-src
-O2
-fomit-frame-pointer
-fbaserel
-S
$(INCBASE
).c
-o
$(INCBASE
)b.asm
51 $(INCBASE
)b32.asm
: $(INCBASE
).c
52 $(CC
) -I
$(srcdir)/..
/include-src
-O2
-fomit-frame-pointer
-m68020
-fbaserel32
-S
$(INCBASE
).c
-o
$(INCBASE
)b32.asm
54 $(INCBASE
).c
: $(INCBASE
).h
56 grep
'#include' $(AMIGAOS_HEADER_PATH
)/clib
/$(INCBASE
)_protos.h
>$(INCBASE
).c
57 if
[ -f
$(srcdir)/..
/include-src
/proto
/$(INCBASE
).h
]; then \
58 grep
'#include' $(srcdir)/..
/include-src
/proto
/$(INCBASE
).h \
59 | grep
-v
'#include.*<clib/' | grep
-v
'#include.*<inline/' \
60 | grep
-v
'#include.*<proto/' >>$(INCBASE
).c
; \
63 echo
'#include "$(INCBASE).h"' >>$(INCBASE
).c
66 ..
/fd2inline
--stubs
$(AMIGAOS_FD_PATH
)/$(INCBASE
)_lib.fd
$(AMIGAOS_HEADER_PATH
)/clib
/$(INCBASE
)_protos.h
-o
$(INCBASE
).h
69 $(RM
) *.asm
*.c
*.h
*.o
*.s