Minor Makefile fixes
authorWill Sowerbutts <will@sowerbutts.com>
Sat, 3 Jan 2015 16:17:37 +0000 (16:17 +0000)
committerWill Sowerbutts <will@sowerbutts.com>
Sat, 3 Jan 2015 16:22:51 +0000 (16:22 +0000)
Libary: Link syslib.lib to c.lib (which is the name fcc expects to use)

Applications: Use fcc to build, remove reference to env.c and uname.c
which are not present in the git repository.

Applications/util/Makefile
Library/libs/Makefile

index 0f6c615..aad0c8b 100644 (file)
@@ -2,6 +2,7 @@ CC = sdcc
 ASM = sdasz80
 AR = sdar
 LINKER = sdcc
+FCC = ../../Library/tools/fcc
 
 PROGLOAD=`(cat ../../Kernel/platform/config.h; echo PROGLOAD) | cpp -E | tail -n1`
 
@@ -38,7 +39,6 @@ SRCS  = banner.c \
        du.c \
        echo.c \
        ed.c \
-       env.c \
        false.c \
        fdisk.c \
        fgrep.c \
@@ -83,7 +83,6 @@ SRCS  = banner.c \
        tr.c \
        true.c \
        umount.c \
-       uname.c \
        uniq.c \
        uud.c \
        uue.c \
@@ -112,13 +111,10 @@ $(OBJSBAD): $(SRCSBAD)
        $(CC) $(CC_CRAP) $(@:.rel=.c)
 
 .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
index bd17e60..d819b34 100644 (file)
@@ -72,6 +72,7 @@ syslib.lib: syscall.l libc.l sdccz80.lib
        cp sdccz80.lib syslib.lib
        $(AR) rc syslib.lib @syslib.l
        $(AR) s syslib.lib
+       ln -s syslib.lib c.lib
 
 fuzix/syslib.l:
        ../tools/syscall