New developer version 0.6.8; added select () function; added demonstrating example...
[ZeXOS.git] / kernel / arch / i386 / Makefile
blob01b752f290332bea49c0c67c2df3702ecdcf4488
1 .SUFFIXES: .asm
3 ARCH =i386
5 CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer -fcombine-regs
6 # defines
7 MAKEFILE=Makefile
8 MAKEDEP=$(MAKEFILE)
9 INCDIR =../../include/
10 NASM =nasm -f elf
11 CC =gcc -m32 -g -O2 -nostdinc -fno-builtin -Wno-unused-parameter -I$(INCDIR) -I../../build/main
12 CCASM =gcc -D__ASSEMBLY__ -g -Os -pipe -fno-strict-aliasing -fno-builtin -ffreestanding
13 OBJS =int.o arch.o gdt.o idt.o isrs.o irq.o timer.o vm86.o paging_i486.o paging.o rtc.o task.o syscall.o io.o elf32.o smp.o ipi.o
15 ifneq ($(V),1)
16 Q := @
17 endif
19 # targets
20 all: $(OBJS) arch.a
22 clean:
23 $(Q)rm -f *.o ../arch.a boot/start.o $(OBJS)
24 @printf " CLEAN\n";
25 .S.o:
26 @printf " ASM $(subst $(shell pwd)/,,$(@))\n";
27 $(Q)$(CCASM) -c -o$@ $<
29 .s.o:
30 @printf " ASM $(subst $(shell pwd)/,,$(@))\n";
31 $(Q)$(NASM) -o$@ $<
33 .c.o:
34 @printf " CC $(subst $(shell pwd)/,,$(@))\n";
35 $(Q)$(CC) -c -o$@ $<
37 # explicit rules
38 arch.a: $(OBJS) $(MAKEDEP)
39 @printf " AR $(subst $(shell pwd)/,,$(@))\n";
40 $(Q)ar rcs ../arch.a $(OBJS)