LIBS = ../../Library/libs/syslib.lib
+FCC = ../../Library/tools/fcc
+
APPS = $(OBJS:.rel=)
all: $(APPS)
$(OBJS): $(SRCS)
.c.rel:
- $(CC) $(CC_OPT) $(@:.rel=.c)
+ $(FCC) -c $<
%: %.rel
- $(LINKER) $(LINKER_OPT) ../../Library/libs/crt0.rel $< $(LIBS) -o $@.ihx
- makebin -s 65536 $@.ihx $@.tmp
- $(BINMAN) $(PROGLOAD) $@.tmp $@.map $@
- chmod +x $@
+ $(FCC) $< -o $@
clean:
rm -f $(OBJS) $(APPS) $(SRCS:.c=) core *~ *.asm *.lst *.sym *.map *.noi *.lk *.ihx *.tmp
--- /dev/null
+syslib.lib
\ No newline at end of file
ASRCS += syscall__profil.s
ASRCS += syscall_uadmin.s
ASRCS += syscall_nice.s
+ASRCS += syscall__sigdisp.s
ASRCALL = $(ASRCS) $(ASYS)
{
pid_t pid, w;
int status;
-
+
if (verbose)
printf("\n\n");
argvec[argp] = NULL;
autotarget();
add_option("-o", target);
if (mode == MODE_LINK) {
- add_argument("/opt/fcc/lib/crt0.rel");
+ add_argument("/home/btg/projects/fuzix/Library/libs/crt0.rel");
}
if (srchead)
add_argument_list(srchead);
}
}
}
- add_include_path("/opt/fcc/include/");
- add_library_path("/opt/fcc/lib/");
+ add_include_path("/home/btg/projects/fuzix/Library/include/");
+ add_library_path("/home/btg/projects/fuzix/Library/libs/");
add_library("c");
build_command();
if (ret)
exit(ret);
argp = 0;
- add_argument("/opt/fcc/bin/binman");
+ add_argument("/home/btg/projects/fuzix/Library/tools/binman");
add_argument(t);
add_argument(rebuildname("", target, "map"));
add_argument(chopname(target));
# Clean the supplied SDCC library of stuff we don't want. This
# IMHO beats forking the library or building a private copy.
#
-#
-cp /opt/sdcc/share/sdcc/lib/z80/z80.lib tmp.lib
+
+# Look for the sdcc library in one of the common locations
+for f in /opt/sdcc/share/sdcc/lib/z80/z80.lib \
+ /usr/local/share/sdcc/lib/z80/z80.lib \
+ /usr/share/sdcc/lib/z80/z80.lib; do
+ if [ -e $f ]; then
+ cp $f tmp.lib
+ break
+ fi;
+done
+
+if [ ! -e tmp.lib ]; then
+ echo "Cannot find sdcc z80.lib"
+ exit 1
+fi
+
#
# Scrub the functions we don't want to inherit
# Need to review setjmp and maybe a couple of others