# Copyright (C) Advanced RISC Machines Limited 1994. All rights reserved. # Makefile for shared string library (reentrant APCS) example. CLIBSRC=../../cl CC=armcc LD=armlink AS=armasm SD=armsd # If you change -li below and in the $(SD) command later, you MUST change # config.h to #define BYTESEX_ODD, not BYTESEX_EVEN. This Makefile and all # the sources it uses assume little-endian operation. RCFLAGS=-li -apcs 3/32bit/reent -zps1 RAFLAGS=-li -apcs 3/32bit/reent .SILENT: all: echo "Use 'make run' to run the test" echo "Use 'make build' to build the test" echo "Use 'make clean' to tidy up afterwards" # A armsd.ini file is used to load the shared string library so that its # EFT starts at 0x4000 (built in to dynlink.s - see below). You can alter # this provided you do so carefully... build: rstub.o strtest armsd.ini echo "Now use 'make run' to run the test" run: strlib strtest armsd.ini $(SD) -li strtest echo "Now use 'make clean' to tidy up" clean: rm -f armsd.ini map maplib strtest strlib *.o # Here we make a sharable library out of the ANSI C Library's string functions. # We make a reentrant stub for use with a reentrant client. rstub.o: string.o echo Making strlib and rstub.o echo "Please ignore (Warning) Attribute conflict" echo "" $(LD) -o rstub.o -reent -s - -shl strshl -map string.o > maplib @echo Made strlib and a matching reentrant stub # The armsd.ini file instructs armsd to load the shared string library so its # EFT is located at the address assumed by dynlink.s. Here, we grep the # assumed address from dynlink.s and the EFT's offset from the library's # map file (maplib). We load the library at
-