Success!
here is the makefile
Цитата:
all: $(targetname).tap
#OBJECTS = ""
$(targetname).tap: $(targetname).bin
bin2tap -b -a 25000 -c 24999 -r 25000 -o $(targetname).tap $(targetname).bin
fuse $(targetname).tap
$(targetname).bin: $(targetname).ihx
hex2bin $(targetname).ihx
$(targetname).ihx: $(targetname).c
sdcc $(targetname).c -mz80 --code-loc 25000 --data-loc 53000 --no-std-crt0 --opt-code-size --funsigned-char --disable-warning 126 -I $(XDEV)/ZXDev/Lib/C -I $(XDEV)/ZXDev/Lib $(XDEV)/ZXDev/Lib/Basic.lib $(XDEV)/ZXDev/Lib/XDev.lib
$(targetname).c :$(OBJECTS) $(targetname).mod
ofront+ $(targetname).mod -m
%.lib: %.rel
sdcclib $@ $<
%.rel:%.c
sdcc -mz80 -c $< -I Lib
%.c %.sym:%.mod
ofront+ $< -e -s
clean:
rm *.lib *.rel *.c *.h *.ihx *.bin
it works on windows and linux
windows needs MinGW installed,
the xdev environment variable is used to import libraries, so that has to be set
then you have to add a lot of stuff to your PATH
c:/mingw/msys/1.0/bin - for windows users only
xdev/zxdev/bin
fuse emulator location
sdcc location
ofront+ location
then you just run "make targetname=hello" if you main file is called hello.mod
the makefile
turns your mod files into c and sym
then compiles c to hex
then converts hex to bin
then converts bin to tap
and runs fuse
if one of these steps fails it stops and gives the error message
I run the makefile from a text editor called geany.
If I want to create a library in c and use it in oberon do I just need a def file along with the C?
if you also need .sym files how are those created?
I looked through the ofront manual and couldnt find any info on that