Subversion Repositories HelenOS

Rev

Rev 2443 | Rev 2452 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2443 Rev 2444
Line 36... Line 36...
36
## Common compiler flags
36
## Common compiler flags
37
#
37
#
38
 
38
 
39
DEFS = -D$(ARCH) -DARCH=\"$(ARCH)\" -DRELEASE=\"$(RELEASE)\" "-DNAME=\"$(NAME)\"" -DKERNEL
39
DEFS = -D$(ARCH) -DARCH=\"$(ARCH)\" -DRELEASE=\"$(RELEASE)\" "-DNAME=\"$(NAME)\"" -DKERNEL
40
CFLAGS = -fno-builtin -fomit-frame-pointer -Wall -Wmissing-prototypes -Werror -O3 -nostdlib -nostdinc -Igeneric/include/
40
CFLAGS = -fno-builtin -fomit-frame-pointer -Wall -Wmissing-prototypes -Werror -O3 -nostdlib -nostdinc -Igeneric/include/
-
 
41
#SUNCC_CFLAGS = -xO3 -Igeneric/include/ -xnolib -xc99=all
41
LFLAGS = -M
42
LFLAGS = -M
42
AFLAGS =
43
AFLAGS =
43
 
44
 
44
ifdef REVISION
45
ifdef REVISION
45
	DEFS += "-DREVISION=\"$(REVISION)\""
46
	DEFS += "-DREVISION=\"$(REVISION)\""
Line 118... Line 119...
118
## Toolchain configuration
119
## Toolchain configuration
119
#
120
#
120
 
121
 
121
ifeq ($(COMPILER),gcc_native)
122
ifeq ($(COMPILER),gcc_native)
122
	CC = gcc
123
	CC = gcc
-
 
124
	AS_CC = gcc
123
	AS = as
125
	AS = as
124
	LD = ld
126
	LD = ld
125
	OBJCOPY = objcopy
127
	OBJCOPY = objcopy
126
	OBJDUMP = objdump
128
	OBJDUMP = objdump
127
	LIBDIR = /usr/lib
129
	LIBDIR = /usr/lib
128
endif
130
endif
129
 
131
 
130
ifeq ($(COMPILER),icc_native)
132
ifeq ($(COMPILER),icc_native)
131
	CC = icc
133
	CC = icc
-
 
134
	AS_CC = gcc
132
	AS = as
135
	AS = as
133
	LD = ld
136
	LD = ld
134
	OBJCOPY = objcopy
137
	OBJCOPY = objcopy
135
	OBJDUMP = objdump
138
	OBJDUMP = objdump
136
	LIBDIR = /usr/lib
139
	LIBDIR = /usr/lib
137
endif
140
endif
138
 
141
 
139
ifeq ($(COMPILER),suncc_native)
142
ifeq ($(COMPILER),suncc_native)
140
	CC = suncc
143
	CC = suncc
-
 
144
	AS_CC = gcc
141
	AS = as
145
	AS = as
142
	LD = ld
146
	LD = ld
143
	OBJCOPY = objcopy
147
	OBJCOPY = objcopy
144
	OBJDUMP = objdump
148
	OBJDUMP = objdump
145
	LIBDIR = /usr/lib
149
	LIBDIR = /usr/lib
146
endif
150
endif
147
 
151
 
148
ifeq ($(COMPILER),gcc_cross)
152
ifeq ($(COMPILER),gcc_cross)
149
	CC = $(TOOLCHAIN_DIR)/bin/$(TARGET)-gcc
153
	CC = $(TOOLCHAIN_DIR)/bin/$(TARGET)-gcc
-
 
154
	AS_CC = $(CC)
150
	AS = $(TOOLCHAIN_DIR)/bin/$(TARGET)-as
155
	AS = $(TOOLCHAIN_DIR)/bin/$(TARGET)-as
151
	LD = $(TOOLCHAIN_DIR)/bin/$(TARGET)-ld
156
	LD = $(TOOLCHAIN_DIR)/bin/$(TARGET)-ld
152
	OBJCOPY = $(TOOLCHAIN_DIR)/bin/$(TARGET)-objcopy
157
	OBJCOPY = $(TOOLCHAIN_DIR)/bin/$(TARGET)-objcopy
153
	OBJDUMP = $(TOOLCHAIN_DIR)/bin/$(TARGET)-objdump
158
	OBJDUMP = $(TOOLCHAIN_DIR)/bin/$(TARGET)-objdump
154
	LIBDIR = $(TOOLCHAIN_DIR)/lib
159
	LIBDIR = $(TOOLCHAIN_DIR)/lib
Line 329... Line 334...
329
 
334
 
330
disasm: kernel.raw
335
disasm: kernel.raw
331
	$(OBJDUMP) -d kernel.raw > kernel.disasm
336
	$(OBJDUMP) -d kernel.raw > kernel.disasm
332
 
337
 
333
%.o: %.S
338
%.o: %.S
334
	$(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@
339
	$(AS_CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@
335
 
340
 
336
%.o: %.s
341
%.o: %.s
337
	$(AS) $(AFLAGS) $< -o $@
342
	$(AS) $(AFLAGS) $< -o $@
338
 
343
 
339
%.o: %.c
344
%.o: %.c