diff options
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 44 |
1 files changed, 39 insertions, 5 deletions
@@ -5,6 +5,18 @@ # Copyright 2005 James Bursa <james@semichrome.net> # +# choose one of the two below +COMPILER = gcc +#COMPILER = norcroft + + +SOURCE = rufl_init.c rufl_quit.c rufl_dump_state.c \ + rufl_character_set_test.c \ + rufl_paint.c rufl_glyph_map.c rufl_invalidate_cache.c + + +ifeq ($(COMPILER), gcc) +# cross-compiling using gccsdk CC = /home/riscos/cross/bin/gcc CFLAGS = -std=c99 -O3 -W -Wall -Wundef -Wpointer-arith -Wcast-qual \ -Wcast-align -Wwrite-strings -Wstrict-prototypes \ @@ -13,15 +25,37 @@ CFLAGS = -std=c99 -O3 -W -Wall -Wundef -Wpointer-arith -Wcast-qual \ -mpoke-function-name -I/home/riscos/env/include LIBS = -L/home/riscos/env/lib -loslib -SOURCE = rufl_init.c rufl_quit.c rufl_dump_state.c \ - rufl_character_set_test.c \ - rufl_paint.c rufl_glyph_map.c rufl_invalidate_cache.c - all: rufl.o rufl_test,ff8 rufl_chars,ff8 - rufl.o: $(SOURCE) rufl.h rufl_internal.h Glyphs $(CC) $(CFLAGS) -c -o $@ $(SOURCE) +else +# compiling on RISC OS using Norcroft +CC = cc +CFLAGS = -fn -ecz -wap -IOSLib: -DNDEBUG +LD = link +LDFLAGS = -aof +LIBS = OSLib:o.oslib32 +MKDLK = makedlk +SOURCE += strfuncs.c + +all: rufl.o rufl/pyd rufl_test,ff8 rufl_chars,ff8 +rufl.o: o.rufl +o.rufl: $(OBJS) rufl.h rufl_internal.h Glyphs + $(LD) $(LDFLAGS) -o $@ $(OBJS) +o.ruflmodule: ruflmodule.o rufl.o + $(LD) $(LDFLAGS) -o $@ $^ $(LIBS) +ruflmodule.o: ruflmodule.c + $(CC) -fn -wp -IPyInc:Include,PyInc:RISCOS,TCPIPLibs:,OSLib: -c $@ $< +rufl/pyd: o.ruflmodule + $(MKDLK) -s <Python$$Dir>.RISCOS.s.linktab -o $< -d $@ -e initrufl +%.o: %.c + $(CC) $(CFLAGS) -c -o $@ $< + +endif + + +# common rules rufl_glyph_map.c: Glyphs makeglyphs ./makeglyphs < Glyphs > $@ |