Subversion Repositories shark

Rev

Rev 558 | Rev 598 | 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
 
573 giacomo 19
ifeq ($(findstring LINUX,$(ENV)) , LINUX)
20
CFG_OPT += -D__LINUX__
21
endif
22
ifeq ($(findstring DJGPP,$(ENV)) , DJGPP)
23
CFG_OPT += -D__GNU__
24
endif
25
 
558 giacomo 26
ifeq ($(TSC),TRUE)
27
CFG_OPT += -D__TSC__
28
ifeq ($(APIC),TRUE)
29
CFG_OPT += -D__APIC__
30
endif
31
endif
32
 
33
ifeq ($(findstring VM86,$(BIOS)) , VM86)
34
CFG_OPT += -DVM86
35
endif
36
 
37
ifeq ($(findstring NEW,$(TRACER)) , NEW)
38
CFG_OPT += -D__NEW_TRACER__
39
endif
40
ifeq ($(findstring OLD,$(TRACER)) , OLD)
41
CFG_OPT += -D__OLD_TRACER__
42
endif
43
INCL += -I$(BASE)/tracer/include
44
 
45
ifeq ($(findstring VESA,$(FB)) , VESA)
46
CFG_VIDEO_OPT += -DCONFIG_FB_VESA -DCONFIG_LOGO
47
endif
48
ifeq ($(findstring FINDPCI,$(FB)) , FINDPCI)
49
CFG_VIDEO_OPT += -DCONFIG_FB_RIVA -DCONFIG_FB_RADEON -DCONFIG_FB_MATROX\
50
		-DCONFIG_LOGO -DCONFIG_FB_MATROX_G100 -DCONFIG_FB_MATROX_MILLENIUM\
51
		-DCONFIG_FB_MATROX_MYSTIQUE
52
endif
53
ifeq ($(findstring VGA16,$(FB)) , VGA16)
54
CFG_VIDEO_OPT += -DCONFIG_FB_VGA16
55
endif
56
 
57
C_WARN       = -Wimplicit-function-declaration -Wall
58
C_FLAGS      = -O -fno-builtin -nostdinc
59
C_INC        = -I$(INCL) $(OTHERINCL) -I$(OSLIB)
573 giacomo 60
C_MAC        = $(CFG_OPT)
558 giacomo 61
 
62
ASM_WARN     =
63
ASM_FLAGS    = -x assembler-with-cpp
64
ASM_INC      = -I$(INCL) $(OTHERINCL) -I$(OSLIB)
573 giacomo 65
ASM_MAC      = $(CFG_OPT)
558 giacomo 66
 
67
LINK_OPT = -Bstatic -Ttext $(MEM_START) -s -nostartfiles -nostdlib -L$(LIB_PATH) -L$(OSLIB_PATH)
68
 
69
C_OPT        = $(C_DEF) $(C_WARN) $(C_INC) $(C_MAC) $(C_FLAGS)
70
C_OUTPUT     = -o $*.o
71
 
72
ASM_OPT      = $(ASM_DEF) $(ASM_WARN) $(ASM_INC) $(ASM_MAC) $(ASM_FLAGS)
73
ASM_OUTPUT   = -o $*.o
74
 
75
MKDIR   = mkdir
76
CP	= cp
77
CAT	= cat
78
RM	= rm -f
79
CD	= cd
80
 
81
# Common rules
82
 
83
%.o : %.s
84
	$(REDIR) $(CC) $(ASM_OPT) $(ASM_OUTPUT) -c $<
85
%.o : %.c
86
	$(REDIR) $(CC) $(C_OPT) $(C_OUTPUT) -c $<
87
%.s : %.c
88
	$(REDIR) $(CC) $(C_OPT) $(C_OUTPUT) -S $<
89
%.o : %.cpp
90
	$(REDIR) $(CPP) $(C_OPT) $(C_OUTPUT) -c $<