Subversion Repositories shark

Rev

Rev 573 | Rev 623 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
558 giacomo 1
include $(BASE)/shark.cfg
2
 
3
CPP = gcc
4
CC  = gcc
5
AS  = gcc
6
LD  = ld
7
AR  = ar
8
 
9
INCL   = $(BASE)/include
10
LIB_PATH    = $(BASE)/lib
11
OSLIB = $(BASE)/oslib
12
OSLIB_PATH = $(OSLIB)/lib
13
LIB_DIR  = $(BASE)/lib
14
 
15
LIBRARYPATHNAME= $(LIB_PATH)/lib$(LIBRARY).a
16
LIBRARYDIR= $(LIB_PATH)
17
LIBRARYOBJS= $(LIB_OBJS)
18
 
598 giacomo 19
CFG_OPT = -D__LINUX__
573 giacomo 20
 
558 giacomo 21
ifeq ($(TSC),TRUE)
22
CFG_OPT += -D__TSC__
23
ifeq ($(APIC),TRUE)
24
CFG_OPT += -D__APIC__
25
endif
26
endif
27
 
28
ifeq ($(findstring VM86,$(BIOS)) , VM86)
29
CFG_OPT += -DVM86
30
endif
31
 
32
ifeq ($(findstring NEW,$(TRACER)) , NEW)
598 giacomo 33
ifeq ($(TSC),TRUE)
558 giacomo 34
CFG_OPT += -D__NEW_TRACER__
35
endif
598 giacomo 36
endif
558 giacomo 37
ifeq ($(findstring OLD,$(TRACER)) , OLD)
38
CFG_OPT += -D__OLD_TRACER__
39
endif
40
INCL += -I$(BASE)/tracer/include
41
 
42
ifeq ($(findstring VESA,$(FB)) , VESA)
43
CFG_VIDEO_OPT += -DCONFIG_FB_VESA -DCONFIG_LOGO
44
endif
45
ifeq ($(findstring FINDPCI,$(FB)) , FINDPCI)
46
CFG_VIDEO_OPT += -DCONFIG_FB_RIVA -DCONFIG_FB_RADEON -DCONFIG_FB_MATROX\
47
		-DCONFIG_LOGO -DCONFIG_FB_MATROX_G100 -DCONFIG_FB_MATROX_MILLENIUM\
48
		-DCONFIG_FB_MATROX_MYSTIQUE
49
endif
50
ifeq ($(findstring VGA16,$(FB)) , VGA16)
51
CFG_VIDEO_OPT += -DCONFIG_FB_VGA16
52
endif
53
 
54
C_WARN       = -Wimplicit-function-declaration -Wall
55
C_FLAGS      = -O -fno-builtin -nostdinc
56
C_INC        = -I$(INCL) $(OTHERINCL) -I$(OSLIB)
573 giacomo 57
C_MAC        = $(CFG_OPT)
558 giacomo 58
 
59
ASM_WARN     =
60
ASM_FLAGS    = -x assembler-with-cpp
61
ASM_INC      = -I$(INCL) $(OTHERINCL) -I$(OSLIB)
573 giacomo 62
ASM_MAC      = $(CFG_OPT)
558 giacomo 63
 
64
LINK_OPT = -Bstatic -Ttext $(MEM_START) -s -nostartfiles -nostdlib -L$(LIB_PATH) -L$(OSLIB_PATH)
65
 
66
C_OPT        = $(C_DEF) $(C_WARN) $(C_INC) $(C_MAC) $(C_FLAGS)
67
C_OUTPUT     = -o $*.o
68
 
69
ASM_OPT      = $(ASM_DEF) $(ASM_WARN) $(ASM_INC) $(ASM_MAC) $(ASM_FLAGS)
70
ASM_OUTPUT   = -o $*.o
71
 
72
MKDIR   = mkdir
73
CP	= cp
74
CAT	= cat
75
RM	= rm -f
76
CD	= cd
77
 
78
# Common rules
79
 
80
%.o : %.s
81
	$(REDIR) $(CC) $(ASM_OPT) $(ASM_OUTPUT) -c $<
82
%.o : %.c
83
	$(REDIR) $(CC) $(C_OPT) $(C_OUTPUT) -c $<
84
%.s : %.c
85
	$(REDIR) $(CC) $(C_OPT) $(C_OUTPUT) -S $<
86
%.o : %.cpp
87
	$(REDIR) $(CPP) $(C_OPT) $(C_OUTPUT) -c $<