summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/i386
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/i386')
-rw-r--r--libc/sysdeps/linux/i386/Makefile34
1 files changed, 17 insertions, 17 deletions
diff --git a/libc/sysdeps/linux/i386/Makefile b/libc/sysdeps/linux/i386/Makefile
index 57fed3bf4..165d16cbd 100644
--- a/libc/sysdeps/linux/i386/Makefile
+++ b/libc/sysdeps/linux/i386/Makefile
@@ -5,31 +5,31 @@
TOPDIR=../../../
include $(TOPDIR)Rules.make
+LIBC=$(TOPDIR)libc.a
CFLAGS+= -D_GCC_LIMITS_H_
-LIBC=$(TOPDIR)libc.a
+MSRC=syscalls.S
+include makefile.objs
+SFILES=setjmp.S longjmp.S _start.S _exit.S #fork.o
+SOBJS=$(patsubst %.S,%.o, $(SFILES))
+CFILES=readdir.c #select.c
+COBJS=$(patsubst %.c,%.o, $(CFILES))
-.S.s:
- $(CC) $(CFLAGS) -D__ASSEMBLY__ -traditional -E -o $*.s $<
-.S.o:
- $(CC) $(CFLAGS) -c -o $*.o $<
-SSRC=syscalls.S
-OBJ= setjmp.o longjmp.o readdir.o _start.o _exit.o fork.o #select.o
-include makefile.objs
+all: $(SOBJS) $(COBJS) $(MOBJ) $(LIBC)
-all: $(LIBC)
+$(SOBJS): $(SFILES)
+ $(CC) $(CFLAGS) -c $*.S -o $@
-$(LIBC): $(OBJ) $(LIBC)($(SOBJ))
- $(AR) $(ARFLAGS) $@ $(OBJ)
+$(COBJS): $(CFILES)
+ $(CC) $(CFLAGS) -c $*.c -o $@
-$(LIBC)($(SOBJ)): $(SSRC)
- $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
- $(AR) $(ARFLAGS) $@ $*.o
+$(MOBJ): $(MSRC)
+ $(CC) $(CFLAGS) -DL_$* -c $(MSRC) -o $@
-transfer:
- -@rm -f ../include/stdio.h
- cp -p stdio.h ../include/.
+$(LIBC): $(SOBJS) $(COBJS) $(MOBJ)
+ $(AR) $(ARFLAGS) $(LIBC) $(SOBJS) $(COBJS) $(MOBJ)
clean:
rm -f *.o
+