Makefile 3 KB
Newer Older
Simon Middleton's avatar
Simon Middleton committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
# Copyright 1997 Acorn Computers Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Project:   Unicode

CC = armcc
AS = armasm
CCflags = -c -I$(RISCOS_BUILD_EXPORT)/Lib/CLib \
	-ffa -Ospace -DRISCOS -Fn

ASflags = -Stamp -quit

.SUFFIXES: .c .s .o .oz .od .odz

26
.c.o:;	$(CC) -DROM=0 -DDEBUG=0 $(CCflags) -o $@ $<
Simon Middleton's avatar
Simon Middleton committed
27 28 29

.c.od:;	$(CC) -DROM=0 -DDEBUG=1 -Fn $(CCflags) -o $@ $<

30
.c.oz:;	$(CC) -zM -DROM=1 -DDEBUG=0 $(CCflags) -o $@ $<
Simon Middleton's avatar
Simon Middleton committed
31 32 33 34 35 36 37

.s.o:;	$(AS) $(ASflags) -from $< -to $@

Objects =  autojp.o unictype.o \
	utf8.o \
	encoding.o \
	iso2022.o \
38
	eightbit.o \
Simon Middleton's avatar
Simon Middleton committed
39 40 41 42 43 44 45 46 47 48 49
	shiftjis.o \
	bigfive.o \
	enc_utf8.o \
	enc_ascii.o \
	enc_utf16.o \
	enc_ucs4.o

ObjectsD =  autojp.od unictype.od \
	utf8.od \
	encoding.od \
	iso2022.od \
50
	eightbit.od \
Simon Middleton's avatar
Simon Middleton committed
51 52 53 54 55 56 57
	shiftjis.od \
	bigfive.od \
	enc_utf8.od \
	enc_ascii.od \
	enc_utf16.od \
	enc_ucs4.od

58 59 60 61 62 63 64 65 66 67 68 69
ObjectsZ =  autojp.oz unictype.oz \
	utf8.oz \
	encoding.oz \
	iso2022.oz \
	eightbit.oz \
	shiftjis.oz \
	bigfive.oz \
	enc_utf8.oz \
	enc_ascii.oz \
	enc_utf16.oz \
	enc_ucs4.oz

Simon Middleton's avatar
Simon Middleton committed
70 71 72 73 74 75 76 77
all: ucodelib

ucodelib: $(Objects)
	armlib -c -o ucodelib $(Objects)

ucodelibd: $(ObjectsD)
	armlib -c -o ucodelibd $(ObjectsD)

78 79
ucodelibz: $(ObjectsZ)
	armlib -c -o ucodelibz $(ObjectsZ)
Simon Middleton's avatar
Simon Middleton committed
80

81
riscos_libs: ucodelib ucodelibd ucodelibz
Simon Middleton's avatar
Simon Middleton committed
82 83 84 85 86 87 88 89

riscos_export: riscos_libs
	@-mkdir $(RISCOS_BUILD_EXPORT)
	@-mkdir $(RISCOS_BUILD_EXPORT)/Lib
	@-mkdir $(RISCOS_BUILD_EXPORT)/Lib/Unicode
	@echo Made export directories
	@-cp -p ucodelib $(RISCOS_BUILD_EXPORT)/Lib/Unicode/ucodelib.o
	@-cp -p ucodelibd $(RISCOS_BUILD_EXPORT)/Lib/Unicode/ucodelibd.o
90
	@-cp -p ucodelibz $(RISCOS_BUILD_EXPORT)/Lib/Unicode/ucodelibz.o
Simon Middleton's avatar
Simon Middleton committed
91 92 93 94 95
	@cp -p autojp.h $(RISCOS_BUILD_EXPORT)/Lib/Unicode/
	@cp -p charsets.h $(RISCOS_BUILD_EXPORT)/Lib/Unicode/
	@cp -p unictype.h $(RISCOS_BUILD_EXPORT)/Lib/Unicode/
	@cp -p encoding.h $(RISCOS_BUILD_EXPORT)/Lib/Unicode/
	@cp -p iso10646.h $(RISCOS_BUILD_EXPORT)/Lib/Unicode/
96
	@cp -p languages.h $(RISCOS_BUILD_EXPORT)/Lib/Unicode/
Simon Middleton's avatar
Simon Middleton committed
97 98 99 100 101 102 103
	@cp -p utf8.h $(RISCOS_BUILD_EXPORT)/Lib/Unicode/
	@echo Copied libraries

clean:
	@-rm mkunictype
	@-rm unictype.c
	@-rm *.o
104 105 106
	@-rm *.od
	@-rm *.oz
	@-rm ucodelib ucodelibd ucodelibz
Simon Middleton's avatar
Simon Middleton committed
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
	echo Done clean

realclean: clean
	find . -type l -print | xargs rm
	echo Done realclean

unictype.c: ../data/UNIDATA2 mkunictype
	./mkunictype < ../data/UNIDATA2 > unictype.c
	echo Made unictype.c

mkunictype: mkunictype.c
	rsh starman 'cd /projects2/smiddle/renaissa/RiscOS/Sources/Lib/Unicode/unix ; cc -o mkunictype mkunictype.c'
	echo Made mkunictype

# Do not faff with the following comment as Make looks for it explicitly:
# Dynamic dependencies: