Nothing
[ZeXOS.git] / lib / Makefile
blob34dadf468a87c0767b05e950d3797b2b64326f05
1 .SUFFIXES: .asm
3 # defines
4 MAKEFILE=Makefile
5 MAKEDEP=$(MAKEFILE)
6 INCDIR =../include
7 NASM =nasm -f elf -i$(INCDIR)/
8 CC =gcc -m32 -g -Wall -W -O2 -nostdinc -fno-builtin -I$(INCDIR)
10 STDIO =stdio/doprintf.o stdio/delay.o stdio/kprintf.o stdio/printf.o stdio/puts.o
12 STRING =string/memsetw.o string/memcpy.o string/strlen.o string/strcpy.o string/strcat.o string/memset.o string/strcmp.o
14 X86 =x86/inportb.o x86/outportb.o x86/disable.o x86/enable.o x86/dma.o
16 CTYPE =ctype/ctype.o
18 SETJMP =setjmp/setjmp.o setjmp/longjmp.o
20 MEMMGR =mm/memory.o
22 OBJS =$(STDIO) $(STRING) $(X86) $(CTYPE) $(SETJMP) $(MEMMGR)
24 # targets
25 all: libc.a
27 clean:
28 rm -f libc.a $(OBJS)
30 # implicit rules
31 .asm.o:
32 $(NASM) -o$@ $<
34 .c.o:
35 $(CC) -c -o$@ $<
37 # dependencies
38 stdio/doprintf.o: stdio/doprintf.c $(MAKEDEP)
39 stdio/kprintf.o: stdio/kprintf.c $(MAKEDEP)
40 stdio/printf.o: stdio/printf.c $(MAKEDEP)
41 stdio/delay.o: stdio/delay.c $(MAKEDEP)
42 string/memsetw.o: string/memsetw.c $(MAKEDEP)
43 string/memcpy.o: string/memcpy.c $(MAKEDEP)
44 string/strlen.o: string/strlen.c $(MAKEDEP)
45 x86/inportb.o: x86/inportb.c $(MAKEDEP)
46 x86/outportb.o: x86/outportb.c $(MAKEDEP)
47 x86/disable.o: x86/disable.c $(MAKEDEP)
48 x86/enable.o: x86/enable.c $(MAKEDEP)
49 ctype/ctype.o: ctype/ctype.c $(MAKEDEP)
50 setjmp/setjmp.o: setjmp/setjmp.asm $(MAKEDEP)
51 setjmp/longjmp.o: setjmp/longjmp.c $(MAKEDEP)
52 string/strcpy.o: string/strcpy.c $(MAKEDEP)
53 string/strcat.o: string/strcat.c $(MAKEDEP)
54 string/strcmp.o: string/strcmp.c $(MAKEDEP)
55 string/memset.o: string/memset.c $(MAKEDEP)
56 x86/dma.o: x86/dma.c $(MAKEDEP)
57 mm/memory.o: mm/memory.c $(MAKEDEP)
59 # explicit rules
60 libc.a: $(OBJS) $(MAKEDEP)
61 ar rcs libc.a $(OBJS)