aboutsummaryrefslogtreecommitdiff
path: root/linux/lib/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'linux/lib/Makefile')
-rw-r--r--linux/lib/Makefile44
1 files changed, 44 insertions, 0 deletions
diff --git a/linux/lib/Makefile b/linux/lib/Makefile
new file mode 100644
index 0000000..a06698d
--- /dev/null
+++ b/linux/lib/Makefile
@@ -0,0 +1,44 @@
+#
+# Makefile for some libs needed in the kernel.
+#
+# Note! Dependencies are done automagically by 'make dep', which also
+# removes any old dependencies. DON'T put your own dependencies here
+# unless it's something special (ie not a .c file).
+#
+
+AR =gar
+AS =gas
+LD =gld
+LDFLAGS =-s -x
+CC =gcc
+CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer -fcombine-regs \
+ -finline-functions -mstring-insns -nostdinc -I../include
+CPP =gcc -E -nostdinc -I../include
+
+.c.s:
+ $(CC) $(CFLAGS) \
+ -S -o $*.s $<
+.s.o:
+ $(AS) -c -o $*.o $<
+.c.o:
+ $(CC) $(CFLAGS) \
+ -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
+
+lib.a: $(OBJS)
+ $(AR) rcs lib.a $(OBJS)
+ sync
+
+clean:
+ rm -f core *.o *.a tmp_make
+ for i in *.c;do rm -f `basename $$i .c`.s;done
+
+dep:
+ sed '/\#\#\# Dependencies/q' < Makefile > tmp_make
+ (for i in *.c;do echo -n `echo $$i | sed 's,\.c,\.s,'`" "; \
+ $(CPP) -M $$i;done) >> tmp_make
+ cp tmp_make Makefile
+
+### Dependencies: