--- linux/lib/Makefile 2018/04/24 18:00:42 1.1.1.2 +++ linux/lib/Makefile 2018/04/24 18:03:33 1.1.1.4 @@ -6,13 +6,16 @@ # unless it's something special (ie not a .c file). # -AR =gar -AS =gas -LD =gld +# gcc2 doesn't understand some options.. +# GCC_OPT = -fcombine-regs + +AR =ar +AS =as +LD =ld LDFLAGS =-s -x CC =gcc -CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer -fcombine-regs \ - -finline-functions -mstring-insns -nostdinc -I../include +CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer $(GCC_OPT) \ + -finline-functions -nostdinc -I../include CPP =gcc -E -nostdinc -I../include .c.s: @@ -25,7 +28,7 @@ CPP =gcc -E -nostdinc -I../include -c -o $*.o $< OBJS = ctype.o _exit.o open.o close.o errno.o write.o dup.o setsid.o \ - execve.o wait.o string.o + execve.o wait.o string.o malloc.o lib.a: $(OBJS) $(AR) rcs lib.a $(OBJS) @@ -56,6 +59,8 @@ errno.s errno.o : errno.c execve.s execve.o : execve.c ../include/unistd.h ../include/sys/stat.h \ ../include/sys/types.h ../include/sys/times.h ../include/sys/utsname.h \ ../include/utime.h +malloc.s malloc.o : malloc.c ../include/linux/kernel.h ../include/linux/mm.h \ + ../include/asm/system.h open.s open.o : open.c ../include/unistd.h ../include/sys/stat.h \ ../include/sys/types.h ../include/sys/times.h ../include/sys/utsname.h \ ../include/utime.h ../include/stdarg.h