Fixed possible memory corruption in commands exec and netexec; fixed command netcp...
[ZeXOS.git] / kernel / arch / x86_64 / Makefile
bloba934ab9c070b9e30a9d3431c95390640d871d4be
1 .SUFFIXES: .asm
3 ARCH =x86_64
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 -m64 -g -O2 -nostdinc -fno-builtin -I$(INCDIR) -I../../build/main
12 OBJS = arch.o paging_i486.o paging.o timer.o rtc.o elf64.o task.o irq.o gdt.o idt.o isrs.o int.o syscall.o
14 ifneq ($(V),1)
15 Q := @
16 endif
18 # targets
19 all: $(OBJS) arch.a
21 clean:
22 $(Q)rm -f *.o ../arch.a boot/start.o $(OBJS)
23 @printf " CLEAN\n";
25 # implicit rules
26 .s.o:
27 @printf " ASM $(subst $(shell pwd)/,,$(@))\n";
28 $(Q)$(NASM) -o$@ $<
30 .c.o:
31 @printf " CC $(subst $(shell pwd)/,,$(@))\n";
32 $(Q)$(CC) -c -o$@ $<
34 # explicit rules
35 arch.a: $(OBJS) $(MAKEDEP)
36 @printf " AR $(subst $(shell pwd)/,,$(@))\n";
37 $(Q)ar rcs ../arch.a $(OBJS)