/shark/trunk/config/mk/gnu.mk |
---|
49,7 → 49,7 |
ASM_INC = -I$(INCL) -I$(OSLIB) |
ASM_MAC = -D__GNU__ $(CFG_OPT) |
LINK_OPT = -Bstatic -Ttext 0x1720000 -b coff-go32 --oformat coff-go32 -s -nostartfiles -nostdlib -L$(LIB_PATH) -L$(OSLIB_PATH) |
LINK_OPT = -Bstatic -Ttext $(MEM_START) -b coff-go32 --oformat coff-go32 -s -nostartfiles -nostdlib -L$(LIB_PATH) -L$(OSLIB_PATH) |
C_OPT = $(C_DEF) $(C_WARN) $(C_INC) $(C_MAC) $(C_FLAGS) |
C_OUTPUT = -o $*.o |
/shark/trunk/config/mk/linux.mk |
---|
55,7 → 55,7 |
ASM_INC = -I$(INCL) $(OTHERINCL) -I$(OSLIB) |
ASM_MAC = -D__LINUX__ $(CFG_OPT) |
LINK_OPT = -Bstatic -Ttext 0x220000 -s -nostartfiles -nostdlib -L$(LIB_PATH) -L$(OSLIB_PATH) |
LINK_OPT = -Bstatic -Ttext $(MEM_START) -s -nostartfiles -nostdlib -L$(LIB_PATH) -L$(OSLIB_PATH) |
C_OPT = $(C_DEF) $(C_WARN) $(C_INC) $(C_MAC) $(C_FLAGS) |
C_OUTPUT = -o $*.o |
/shark/trunk/config/config.mk |
---|
0,0 → 1,83 |
include $(BASE)/shark.cfg |
CPP = gcc |
CC = gcc |
AS = gcc |
LD = ld |
AR = ar |
INCL = $(BASE)/include |
LIB_PATH = $(BASE)/lib |
OSLIB = $(BASE)/oslib |
OSLIB_PATH = $(OSLIB)/lib |
LIB_DIR = $(BASE)/lib |
LIBRARYPATHNAME= $(LIB_PATH)/lib$(LIBRARY).a |
LIBRARYDIR= $(LIB_PATH) |
LIBRARYOBJS= $(LIB_OBJS) |
ifeq ($(TSC),TRUE) |
CFG_OPT += -D__TSC__ |
ifeq ($(APIC),TRUE) |
CFG_OPT += -D__APIC__ |
endif |
endif |
ifeq ($(findstring VM86,$(BIOS)) , VM86) |
CFG_OPT += -DVM86 |
endif |
ifeq ($(findstring NEW,$(TRACER)) , NEW) |
CFG_OPT += -D__NEW_TRACER__ |
endif |
ifeq ($(findstring OLD,$(TRACER)) , OLD) |
CFG_OPT += -D__OLD_TRACER__ |
endif |
INCL += -I$(BASE)/tracer/include |
ifeq ($(findstring VESA,$(FB)) , VESA) |
CFG_VIDEO_OPT += -DCONFIG_FB_VESA -DCONFIG_LOGO |
endif |
ifeq ($(findstring FINDPCI,$(FB)) , FINDPCI) |
CFG_VIDEO_OPT += -DCONFIG_FB_RIVA -DCONFIG_FB_RADEON -DCONFIG_FB_MATROX\ |
-DCONFIG_LOGO -DCONFIG_FB_MATROX_G100 -DCONFIG_FB_MATROX_MILLENIUM\ |
-DCONFIG_FB_MATROX_MYSTIQUE |
endif |
ifeq ($(findstring VGA16,$(FB)) , VGA16) |
CFG_VIDEO_OPT += -DCONFIG_FB_VGA16 |
endif |
C_WARN = -Wimplicit-function-declaration -Wall |
C_FLAGS = -O -fno-builtin -nostdinc |
C_INC = -I$(INCL) $(OTHERINCL) -I$(OSLIB) |
C_MAC = -D__LINUX__ $(CFG_OPT) |
ASM_WARN = |
ASM_FLAGS = -x assembler-with-cpp |
ASM_INC = -I$(INCL) $(OTHERINCL) -I$(OSLIB) |
ASM_MAC = -D__LINUX__ $(CFG_OPT) |
LINK_OPT = -Bstatic -Ttext $(MEM_START) -s -nostartfiles -nostdlib -L$(LIB_PATH) -L$(OSLIB_PATH) |
C_OPT = $(C_DEF) $(C_WARN) $(C_INC) $(C_MAC) $(C_FLAGS) |
C_OUTPUT = -o $*.o |
ASM_OPT = $(ASM_DEF) $(ASM_WARN) $(ASM_INC) $(ASM_MAC) $(ASM_FLAGS) |
ASM_OUTPUT = -o $*.o |
MKDIR = mkdir |
CP = cp |
CAT = cat |
RM = rm -f |
CD = cd |
# Common rules |
%.o : %.s |
$(REDIR) $(CC) $(ASM_OPT) $(ASM_OUTPUT) -c $< |
%.o : %.c |
$(REDIR) $(CC) $(C_OPT) $(C_OUTPUT) -c $< |
%.s : %.c |
$(REDIR) $(CC) $(C_OPT) $(C_OUTPUT) -S $< |
%.o : %.cpp |
$(REDIR) $(CPP) $(C_OPT) $(C_OUTPUT) -c $< |
/shark/trunk/shark.cfg |
---|
3,6 → 3,14 |
# Oslib Configuration |
# |
# Kernel Image Start Point |
# MEM_START = 0x220000 |
# The kernel image file will be loaded starting from this |
# physical memory address. For DOS users it is important |
# to set an high address (like 0x1720000) if you are using |
# Smartdrive or other tools which require Extended Memory |
MEM_START = 0x220000 |
# Enable the system time computation through TSC register |
# Only Pentium or higher CPU class |
TSC = TRUE |
11,7 → 19,7 |
# Only P6 or higher CPU class, TSC support must be enabled |
APIC = TRUE |
#Enable Read Timer Optimization |
# Enable TSC Read Timer Optimization |
#TIMER_OPT = 1000 (For CPU < 1 GHz - Wraparound 585 years) |
#TIMER_OPT = 2000 (For 1 GHz < CPU < 2 GHz - Wraparound 146 years) |
#TIMER_OPT = 4000 (For 2 GHz < CPU < 4 GHz - Wraparound 36 years) |
20,7 → 28,7 |
#Select the events tracer |
# TRACER = "NO","OLD","NEW" |
TRACER = "NEW" |
TRACER = "NO" |
#Select the BIOS INTERRUPT access mode |
#BIOS = "X","VM86" |
30,7 → 38,7 |
# VM86 means that shark call the BIOS interrupts as |
# Virtual Machine 86, and you can load a graphical |
# demo also through GRUB. VM86 MODE IS NOT COMPATIBLE |
# WITH SOME VGA CARDS |
# WITH SOME VGA CARDS (MATROX) |
BIOS = "X" |
#Select the FrameBuffer Configuration |
42,4 → 50,3 |
# use a specific driver to enable it |
# VGA16 enable the VGA16 (4 bpp) video mode |
FB = "VESA" |
/shark/trunk/oslib/config.mk |
---|
0,0 → 1,57 |
include $(BASE)/../shark.cfg |
CC = gcc |
AS = gcc |
LD = ld |
AR = ar |
INCL = $(BASE) |
LIB_PATH = $(BASE)/lib/ |
LIB_DIR = $(BASE)/lib |
ifeq ($(TSC),TRUE) |
CFG_OPT += -D__TSC__ |
ifeq ($(APIC),TRUE) |
CFG_OPT += -D__APIC__ |
endif |
endif |
ifeq ($(findstring 1000,$(TIMER_OPT)) , 1000) |
CFG_OPT += -D__O1000__ |
else |
ifeq ($(findstring 2000,$(TIMER_OPT)) , 2000) |
CFG_OPT += -D__O2000__ |
else |
ifeq ($(findstring 4000,$(TIMER_OPT)) , 4000) |
CFG_OPT += -D__O4000__ |
else |
CFG_OPT += -D__O8000__ |
endif |
endif |
endif |
ifeq ($(findstring NEW,$(TRACER)) , NEW) |
CFG_OPT += -D__NEW_TRACER__ |
endif |
ifeq ($(findstring OLD,$(TRACER)) , OLD) |
CFG_OPT += -D__OLD_TRACER__ |
endif |
C_OPT = -Wall -O -fno-builtin -nostdinc -D__LINUX__ $(CFG_OPT) -DMAIN=__kernel_init__ -I$(INCL) |
ASM_OPT = -x assembler-with-cpp -D__LINUX__ $(CFG_OPT) -I$(INCL) |
LINK_OPT = -Bstatic -Ttext $(MEM_START) -s -nostartfiles -nostdlib -L$(LIB_PATH) |
MKDIR = mkdir |
CP = cp |
CAT = cat |
RM = rm -f |
RMDIR = rm -rf |
# Common rules |
%.o : %.s |
$(REDIR) $(CC) $(ASM_OPT) -c $< |
%.o : %.c |
$(REDIR) $(CC) $(C_OPT) -c $< |
%.s : %.c |
$(REDIR) $(CC) $(C_OPT) -S $< |