make -C Kernel TARGET=dragon-nx32
# 2. Build the libraries
-make -C Library tools/syscall_6809
make -C Library/libs -f Makefile.6809
# 3. Build the utils
OBJ_HARD = $(SRC_HARD:.c=.rel)
OBJ_ALL = $(OBJ_ASM) $(OBJ_C) $(OBJ_HARD)
-all: syslib$(PLATFORM).lib crt0$(PLATFORM).rel crt0nostdio$(PLATFORM).rel
+all: syslib$(PLATFORM).lib crt0$(PLATFORM).rel crt0nostdio$(PLATFORM).rel liberror.txt
libc.l:%.l:$(OBJ_ALL)
ls $(OBJ_ALL) > libc.l
../tools/syscall
make -C fuzix
+liberror.txt:
+ ../tools/liberror > liberror.txt
+
$(OBJ_ASM):%.rel: %.s
$(ASM) $(ASM_OPT) $@ $(@:.rel=.s)
$(CC) $(CC_NOOPT) $(@:.rel=.c)
clean:
- rm -rf *.rel *.asm *.sym *.lst *.lib *~ syscall.l libc.l syslib.l
+ rm -rf *.rel *.asm *.sym *.lst *.lib *~ syscall.l libc.l syslib.l liberror.txt
(cd fuzix; make clean)
OBJ_C = $(SRC_C:.c=.o)
OBJ_ALL = $(OBJ_ASM) $(OBJ_C)
-all: syslib.lib crt0_6502.o
+all: syslib.lib liberror.txt crt0_6502.o
fuzix6502/Makefile: ../tools/syscall_6502.c ../../Kernel/include/syscall_name.h
(cd ..; make tools/syscall_6502)
$(AR) a syslib.lib $(OBJ_C)
ln -sf syslib.lib c6502.lib
+liberror.txt:
+ ../tools/liberror > liberror.txt
+
$(OBJ_ASM):%.o: %.s
$(ASM) $(ASM_OPT) $@ $(@:.o=.s)
$(CC) $(CC_NOOPT) $(@:.o=.c)
clean:
- rm -rf *.o *.lib *~ syscall.l libc.l syslib.l
+ rm -rf *.o *.lib *~ syscall.l libc.l syslib.l liberror.txt
(cd fuzix6502; make clean)
OBJ_HARD = $(SRC_HARD:.c=.o)
OBJ_ALL = $(OBJ_ASM) $(OBJ_C) $(OBJ_HARD)
-all: syslib$(PLATFORM).lib $(OBJ_CRT0)
+all: syslib$(PLATFORM).lib liberror.txt $(OBJ_CRT0)
libc.l:%.l:$(OBJ_ALL)
ls $(OBJ_ALL) > libc.l
$(AR) -c syslib$(PLATFORM).lib $$(cat syslib.l)
ln -sf syslib$(PLATFORM).lib libc$(PLATFORM).a
-fuzix$(PLATFORM)/syslib.l:
- ../tools/syscall_$(PLATFORM)
+fuzix$(PLATFORM)/syslib.l: ../tools/syscall_$(PLATFORM)
+ $<
make -C fuzix$(PLATFORM)
+../tools/syscall_$(PLATFORM): ../tools/syscall_$(PLATFORM).c
+ make -C .. tools/syscall_$(PLATFORM)
+
+liberror.txt: ../tools/liberror
+ $< -X > $@
+
+../tools/liberror: ../tools/liberror.c
+ make -C .. tools/liberror
+
$(OBJ_ASM):%.o: %.s
$(ASM) $(ASM_OPT) $@ $(@:.o=.s)
clean:
rm -rf *.o *.asm *.sym *.lst *.lib *~ syscall.l libc.l syslib.l \
- libc$(PLATFORM).a
+ libc$(PLATFORM).a liberror.txt
-cd fuzix$(PLATFORM) && make clean
rm -rf fuzix$(PLATFORM)/Makefile
mkdir share
chmod 0755 share
cd lib
-bget usr-files/lib/liberror.txt
+bget ../../Library/libs/liberror.txt
chmod 0644 liberror.txt
cd /var