Rev 558 | Rev 598 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
308 | giacomo | 1 | include $(BASE)/shark.cfg |
2 | |||
82 | pj | 3 | CPP = gcc |
2 | pj | 4 | CC = gcc |
5 | AS = gcc |
||
6 | LD = ld |
||
7 | AR = ar |
||
8 | |||
9 | INCL = $(BASE)/include |
||
45 | pj | 10 | LIB_PATH = $(BASE)/lib |
64 | pj | 11 | OSLIB = $(BASE)/oslib |
45 | pj | 12 | OSLIB_PATH = $(OSLIB)/lib |
2 | pj | 13 | LIB_DIR = $(BASE)/lib |
14 | |||
15 | LIBRARYPATHNAME= $(LIB_PATH)/lib$(LIBRARY).a |
||
16 | LIBRARYDIR= $(LIB_PATH) |
||
17 | LIBRARYOBJS= $(LIB_OBJS) |
||
18 | |||
588 | 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 | |||
308 | giacomo | 26 | ifeq ($(TSC),TRUE) |
353 | giacomo | 27 | CFG_OPT += -D__TSC__ |
308 | giacomo | 28 | ifeq ($(APIC),TRUE) |
29 | CFG_OPT += -D__APIC__ |
||
30 | endif |
||
31 | endif |
||
32 | |||
556 | giacomo | 33 | ifeq ($(findstring VM86,$(BIOS)) , VM86) |
34 | CFG_OPT += -DVM86 |
||
35 | endif |
||
36 | |||
353 | giacomo | 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__ |
||
399 | giacomo | 42 | endif |
362 | giacomo | 43 | INCL += -I$(BASE)/tracer/include |
353 | giacomo | 44 | |
489 | giacomo | 45 | ifeq ($(findstring VESA,$(FB)) , VESA) |
46 | CFG_VIDEO_OPT += -DCONFIG_FB_VESA -DCONFIG_LOGO |
||
450 | giacomo | 47 | endif |
489 | giacomo | 48 | ifeq ($(findstring FINDPCI,$(FB)) , FINDPCI) |
588 | giacomo | 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 |
||
489 | giacomo | 52 | endif |
53 | ifeq ($(findstring VGA16,$(FB)) , VGA16) |
||
54 | CFG_VIDEO_OPT += -DCONFIG_FB_VGA16 |
||
55 | endif |
||
450 | giacomo | 56 | |
2 | pj | 57 | C_WARN = -Wimplicit-function-declaration -Wall |
112 | giacomo | 58 | C_FLAGS = -O -fno-builtin -nostdinc |
66 | pj | 59 | C_INC = -I$(INCL) $(OTHERINCL) -I$(OSLIB) |
588 | giacomo | 60 | C_MAC = $(CFG_OPT) |
2 | pj | 61 | |
62 | ASM_WARN = |
||
63 | ASM_FLAGS = -x assembler-with-cpp |
||
66 | pj | 64 | ASM_INC = -I$(INCL) $(OTHERINCL) -I$(OSLIB) |
588 | giacomo | 65 | ASM_MAC = $(CFG_OPT) |
2 | pj | 66 | |
558 | giacomo | 67 | LINK_OPT = -Bstatic -Ttext $(MEM_START) -s -nostartfiles -nostdlib -L$(LIB_PATH) -L$(OSLIB_PATH) |
2 | pj | 68 | |
311 | giacomo | 69 | C_OPT = $(C_DEF) $(C_WARN) $(C_INC) $(C_MAC) $(C_FLAGS) |
2 | pj | 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 |
||
48 | pj | 84 | $(REDIR) $(CC) $(ASM_OPT) $(ASM_OUTPUT) -c $< |
2 | pj | 85 | %.o : %.c |
86 | $(REDIR) $(CC) $(C_OPT) $(C_OUTPUT) -c $< |
||
87 | %.s : %.c |
||
88 | $(REDIR) $(CC) $(C_OPT) $(C_OUTPUT) -S $< |
||
82 | pj | 89 | %.o : %.cpp |
90 | $(REDIR) $(CPP) $(C_OPT) $(C_OUTPUT) -c $< |