CPPFLAGS += -I./include -I./arch/$(ARCHDIR)/include -D_MODULE_NAME_=\"Kernel\"
CPPFLAGS += -DARCH=$(ARCH) -DARCHDIR=$(ARCHDIR) -DKERNEL_VERSION=$(KERNEL_VERSION) -DBUILD_NUM=$(BUILD_NUM)
-CFLAGS += -Wall -Werror -O3 -fno-stack-protector -fno-builtin -Wstrict-prototypes -g
+CFLAGS += -Wall -Werror -fno-stack-protector -fno-builtin -Wstrict-prototypes -g
+CFLAGS += -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -Wuninitialized
ASFLAGS += -D ARCH=\"$(ARCH)\" -D ARCHDIR=\"$(ARCHDIR)\"
LDFLAGS += -T arch/$(ARCHDIR)/link.ld -g
OBJ += heap.o drvutil.o logging.o debug.o lib.o adt.o time.o
OBJ += messages.o modules.o syscalls.o system.o threads.o
OBJ += $(addprefix vfs/fs/, $(addsuffix .o,$(FILESYSTEMS)))
-OBJ += drv/vterm.o drv/proc.o drv/fifo.o drv/iocache.o drv/dma.o drv/pci.o drv/kb.o drv/vga.o
+OBJ += drv/kb.o drv/vterm.o drv/proc.o drv/fifo.o drv/iocache.o drv/dma.o drv/pci.o drv/vga.o
OBJ += binary.o bin/elf.o bin/pe.o
-OBJ += vfs/main.o vfs/open.o vfs/acls.o vfs/dir.o vfs/io.o vfs/mount.o vfs/memfile.o vfs/nodecache.o
+OBJ += vfs/main.o vfs/open.o vfs/acls.o vfs/dir.o vfs/io.o vfs/mount.o vfs/memfile.o vfs/nodecache.o vfs/handle.o vfs/select.o
OBJ += vfs/fs/root.o vfs/fs/devfs.o
OBJ += $(addprefix drv/, $(addsuffix .o,$(DRIVERS)))
OBJ := $(addsuffix .$(ARCH), $(OBJ))
clean:
@$(RM) $(BIN) ../Acess2.$(ARCH).gz $(BIN).dsm ../Map.$(ARCH).txt LineCounts.$(ARCH).txt $(OBJ) $(DEPFILES)
-install: $(BIN)
- gzip -c $(BIN) > ../Acess2.$(ARCH).gz
+install: $(BIN)
+ cp $(BIN) $(BIN)_
+ $(STRIP) $(BIN)_
+ gzip -c $(BIN)_ > ../Acess2.$(ARCH).gz
+ $(RM) $(BIN)_
$(xCP) ../Acess2.$(ARCH).gz $(DISTROOT)
apidoc:
$(DISASM) -S $(BIN) > $(BIN).dsm
@wc -l $(SRCFILES) include/*.h > LineCounts.$(ARCH).txt
@echo BUILD_NUM = $$(( $(BUILD_NUM) + 1 )) > Makefile.BuildNum.$(ARCH)
- @$(STRIP) $(BIN)
+ $(POSTBUILD)
+# $(STRIP) $(BIN)
%.ao.$(ARCH): %.asm Makefile
- @echo --- NASM -o $@
+ @echo --- AS -o $@
@$(AS) $(ASFLAGS) $< -o $@
%.o.$(ARCH): %.c Makefile
# if exists %*/Makefile
# @make -C %*/ all
# else
- @echo --- GCC -o $@
+ @echo --- CC -o $@
@$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
@$(MAKEDEP) $(CPPFLAGS) -MT $@ -o $*.d.$(ARCH) $<
# endif
%.xo.$(ARCH):
@make -C $* all
-include/syscalls.h: syscalls.lst Makefile
- php GenSyscalls.php
+include/syscalls.h include/syscalls.inc.asm: syscalls.lst Makefile GenSyscalls.pl
+ perl GenSyscalls.pl
Makefile: ../Makefile.cfg arch/$(ARCHDIR)/Makefile