Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1684 → Rev 1685

/shark/branches/xen/kernel/Makefile
1,30 → 1,31
targets:= \
activate.o \
assert.o \
blkact.o \
cancel.o \
conditio.o \
event.o \
exchand.o \
grpcreat.o \
jet.o \
join.o \
kern.o \
keys.o \
kill.o \
init.o \
int_sem.o \
mem.o \
mqueue.o \
mutex.o \
nanoslp.o \
panic.o \
printk.o \
perror.o \
pthread.o \
iqueue.o \
signal.o \
time.o \
tpreempt.o \
assert.o \
blkact.o \
cancel.o \
conditio.o \
event.o \
exchand.o \
grpcreat.o \
jet.o \
join.o \
kern.o \
keys.o \
kill.o \
init.o \
int_sem.o \
mem/ \
mem.o \
mqueue.o \
mutex.o \
nanoslp.o \
panic.o \
printk.o \
perror.o \
pthread.o \
iqueue.o \
signal.o \
time.o \
tpreempt.o \
tskmsg.o
 
/shark/branches/xen/kernel/mem/Makefile
1,34 → 1,17
# The List-based Memory Manager (from OSKit!)
targets:= \
addfree.o \
addregio.o \
alloc.o \
alloc_al.o \
alloc_ge.o \
alloc_pa.o \
avail.o \
avail_in.o \
dump.o \
findfree.o \
free.o \
freepage.o \
init.o \
removefr.o \
stats.o
 
ifndef BASE
BASE=../..
endif
 
include $(BASE)/config/config.mk
 
LIBRARY = mem
 
OBJS_PATH = $(BASE)/kernel/mem
 
#
# Object files
#
 
OBJS = addfree.o \
addregio.o \
alloc.o \
alloc_al.o \
alloc_ge.o \
alloc_pa.o \
avail.o \
avail_in.o \
dump.o \
findfree.o \
free.o \
freepage.o \
init.o \
removefr.o \
stats.o
 
include $(BASE)/config/lib.mk
 
/shark/branches/xen/Rules.mk
0,0 → 1,197
# Shark-specific bits of the build system.
# Include the configuration file.
topdir=$(if $(S),$(S),$(srctree))
include $(topdir)/shark.cfg
 
# Those are the targets used to build all the libraries that compose
# the system. This is the only point (except local Makefiles, of course,
# that need to be added as needed) that has to be modified to add new files
# or directories to the main system.
# $(TARGETS) is the list of the main targets used to build the system,
# it contains all the directories recursed by the main Makefile, and the
# special target libgkern.a, that contains the base system. To add a
# directory that specifies its own libraries simply put it in $(TARGETS).
TARGETS= libgkern.a drivers/ libc/ ports/ tracer/ $(fs-$(SHARK_FS))
 
# $(LIBGKERN-OBJS) is the list of targets that compose libgkern.a. To
# add a directory to it, simply put it here. The generic kernel used to
# be separed from the oslib and from the modules, but that hardly made
# sense for a Shark application, as all those three components are needed
# for it to run.
LIBGKERN-OBJS= arch/$(ARCH)/ kernel/ modules/
 
# Handle Shark configuration. Really insane, indeed, btw there should
# not be the need to modify anything below this point in the file to
# handle common maintainance tasks.
options:=TSC APIC BIOS TRACER FG FB COMPILER
define strip-in-place
$(1):=$(strip $($(1)))
endef
$(foreach cfgopt,$(options),$(eval $(call strip-in-place,$(cfgopt))))
 
cpp-tsc-TRUE:= -D__TSC__
cpp-apic-TRUE:= -D__APIC__
cpp-bios-VM86:= -DVM86
cpp-tracer-NEW:= -D__NEW_TRACER__
cpp-tracer-OLD:= -D__OLD_TRACER__
cpp-fg-FORCE_PXC:= -D__FORCE_PXC__
cpp-fb-VESA:= -DCONFIG_FB_VESA -DCONFIG_LOGO
cpp-fb-FINDPCI:= -DCONFIG_FB_RIVA -DCONFIG_FB_RADEON -DCONFIG_FB_MATROX \
-DCONFIG_LOGO -DCONFIG_FB_MATROX_G100 \
-DCONFIG_FB_MATROX_MILLENIUM -DCONFIG_FB_MATROX_MYSTIQUE
cpp-fb-VGA16:= -DCONFIG_FB_VGA16
 
include-dirs:= \
-I$(topdir)/include -I$(topdir)/modules \
-I$(topdir)/arch/$(ARCH)/include/arch \
-I$(topdir)/libc/arch/$(ARCH)/include \
-I$(topdir)/tracer/include
 
config:= -D__LINUX__ \
$(cpp-tsc-$(TSC)) $(cpp-apic-$(APIC)) $(cpp-bios-$(BIOS)) \
$(cpp-tracer-$(TRACER)) $(cpp-fg-$(FG)) $(cpp-fb-$(FB))
 
exported-cppflags:= $(include-dirs) $(config)
exported-aflags:= -x assembler-with-cpp $(include-dirs) $(config)
 
cc-compiler-GCC4:= -Wimplicit-function-declaration -Wno-attributes \
-Wno-pointer-sign -Wall -O -fno-builtin -nostdinc \
-minline-all-stringops -fno-stack-protector
cc-compiler-GCC3:= -Wimplicit-function-declaration -Wall -O \
-fno-builtin -nostdinc -minline-all-stringops
cc-compiler-DJGPP:= -Wimplicit-function-declaration -Wall -O \
-fno-builtin -nostdinc -minline-all-stringops
 
exported-cflags:= $(cc-compiler-$(COMPILER))
 
fs-YES:= fs/
 
ifndef APP
# If we are not building an application, just build the system libraries.
targets:= $(TARGETS)
libgkern.a-objs:= $(LIBGKERN-OBJS)
all: install
else
# Rules to build a Shark application. The following variables are used:
# APP: the application to build.
# INIT: the initialization object file.
# OTHEROBJS: other objects to be linked to the application.
# OTHERLIBS: other libraries to be linked to the application.
# OTHERINCL: additional preprocessor flags for the app and its
# additional objects.
# SHARKOPT: options to specify which Shark components are to be
# linked to the application.
 
# Directory where we search for the compiled Shark libraries.
libs-dir:= $(if $(B),$(B)/.lib,$(if $(S),$(S)/.lib,\
$(if $(BASE),$(BASE)/.lib,../../.lib)))
ifeq ($(wildcard $(libs-dir)),)
$(error Cannod find Shark build directory)
endif
 
# Handle $(SHARKOPT). Always link the generic kernel and the architecture
# support code, as they're needed for the application to run. Link the
# libc too, as we still don't have proper interface separation.
# XXX Bring back tracer and filesystem.
# XXX The old build system included also the ports and other libs...
app-libs:= -lgkern -lc -lcons -lserial
app-cppflags:= -I$(topdir)/drivers/linuxc26/include\
-I$(topdir)/drivers/cons/include
 
wants-option=$(if $(filter $(1),$(uselib)),y)
 
use-zlib-y:= __ZLIB__
uselib:= $(SHARKOPT)
 
# PCI
libs-__PCI__-y:= -lpci
cppflags-__PCI__-y:= -I$(topdir)/drivers/pci/include
 
# Network
libs-__NET__-y:= -lnet
cppflags-__NET__-y:= -I$(topdir)/drivers/net/include
 
# grx
libs-__GRX__-y:= -lgrx
cppflags-__GRX__-y:= -I$(topdir)/drivers/grx/include
 
# Framebuffer
libs-__FB__-y:= -lfb
cppflags-__FB__-y:= -I$(topdir)/drivers/fb/include
 
# Oldchar
libs-__OLDCHAR__-y:= -loldch
cppflags-__OLDCHAR__-y:= -I$(topdir)/drivers/oldchar/include
 
# Linux compatibility layer
libs-__LINUXC26__-y:= -lcomp26
 
# PCL833
libs-__PCL833__-y:= -lpcl833
cppflags-__PCL833__-y:= -I$(topdir)/drivers/pcl833/include
 
# Parport
libs-__PPORT__-y:= -lpport
cppflags-__PPORT__-y:= -I$(topdir)/drivers/parport/include
 
# PCLAB
libs-__PCLAB__-y:= -lpclab
cppflags-__PCLAB__-y:= -I$(topdir)/drivers/pcl812/include
 
# BTTV
libs-__BTTV__-y:= -lbttv
cppflags-__BTTV__-y:= -I$(topdir)/drivers/bttv/include
 
# Input
libs-__INPUT__-y:= -linput
cppflags-__INPUT__-y:= -I$(topdir)/drivers/input/include
 
# CPU
libs-__CPU__-y:= -lcpu
cppflags-__CPU__-y:= -I$(topdir)/drivers/cpu/include
 
# USB
libs-__USB__-y:= -lusb
cppflags-__USB__-y:= -I$(topdir)/drivers/usb/include
 
# I2C
libs-__I2C__-y:= -li2c
cppflags-__I2C__-y:= -I$(topdir)/drivers/i2c/include
 
# 6025e
libs-__6025E__-y:= -l6025e
cppflags-__6025E__-y:= -I$(topdir)/drivers/pci6025e/include
 
# Mesa
libs-__OSMESA__-y:= -losmesa -lglut -lglu
cppflags-__OSMESA__-y:= -I$(topdir)/ports/mesa/include
 
# Servo
libs-__SERVO__-y:= -lservo
cppflags-__SERVO__-y:= -I$(topdir)/ports/servo/include
 
# TFTP
libs-__TFTP__-y:= -ltftp
cppflags-__TFTP__-y:= -I$(topdir)/ports/tftp/include
 
libs-tracer-OLD:= -ltracer -lnet -lpci -lcomp26
libs-tracer-NEW:= $(libs-tracer-OLD)
 
options= __PCI__ __NET__ __GRX__ __FB__ __OLDCHAR__ __LINUXC26__ __PCL833__\
__PPORT__ __PCLAB__ __BTTV__ __INPUT__ __CPU__ __USB__ __I2C__ \
__6025E__ __OSMESA__ __SERVO__ __TFTP__
 
app-libs+= $(foreach opt,$(options),$(libs-$(opt)-$(call wants-option,$(opt))))
app-cppflags+= $(foreach opt,$(options),$(cppflags-$(opt)-$(call\
wants-option,$(opt))))
 
app-libs+= $(libs-tracer-$(TRACER))
 
targets:= $(APP)
$(APP)-objs:= $(APP).o $(OTHEROBJS)
$(APP)-startup:= $(libs-dir)/x0.o
$(APP)-cppflags+= $(OTHERINCL) $(app-cppflags)
$(APP)-ldflags+= -Bstatic -Ttext $(MEM_START) -s -nostartfiles -nostdlib\
-L$(libs-dir) --start-group $(sort $(app-libs)) $(OTHERLIBS) --end-group
endif
 
/shark/branches/xen/mk/App.mk
0,0 → 1,69
# Copyright (c) 2008 Fabio Checconi <fabio@gandalf.sssup.it>
#
# Helper file defining standard targets for Shark applications. It should
# be included from the application makefiles in this way (preserving much
# of the old behavior):
#
# # Example of Shark application makefile.
# S?=<source tree>
# B?=<build tree, if different from $(S)>
#
# SUBDIRS:= <list of subdirectories>
# APPS:= <list of applications>
#
# include $(S)/mk/App.mk
#
# # For each <application>:
# <application>:
# make -f $(S)/Makefile APP=<application> \
# OTHEROBJS="<list of objects>" \
# OTHERINCL="<list of extra include dirs>" \
# SHARKOPT="<list of options>"
#
# # End of Shark application makefile example.
#
 
ifndef S
$(error Missing Shark source tree specification)
endif
 
define subdir-templ
.PHONY: $(1)-$(2)
$(1)-$(2):
make -C $(1) $(2)
endef
 
define export-if-defined
ifdef $(1)
export $(1)
endif
endef
 
to-be-exported:= S B O CROSS_COMPILE AR CC LD RM INSTALL V
$(foreach v, $(to-be-exported),$(eval $(call export-if-defined,$(v))))
 
foreach-subdir=$(foreach d, $(SUBDIRS),$(eval $(call subdir-templ,$d,$1)))
 
# The default target: build all subdirs and all the applications in the
# current directory.
.PHONY: all
all: subdirs $(APPS)
 
# Build subdirs before applications.
$(APPS): subdirs
 
.PHONY: subdirs
# Build all the subdirs
$(call foreach-subdir,all)
subdirs: $(addsuffix -all,$(SUBDIRS))
 
.PHONY: clean
$(call foreach-subdir,clean)
clean: $(addsuffix -clean,$(SUBDIRS))
rm -f *.o $(APPS)
 
.PHONY: distclean
$(call foreach-subdir,distclean)
distclean: clean $(addsuffix -distclean,$(SUBDIRS))
rm -f .*.deps
 
/shark/branches/xen/ports/mesa/src-glut.dos/Makefile
1,21 → 1,18
# The Frame Buffer Device
targets:= libglut.a
 
ifndef BASE
BASE=../../..
endif
libglut.a-objs:= \
bitmap.o \
color.o \
globals.o \
models.o \
teapot.o \
window.o \
callback.o \
init.o \
menu.o \
overlay.o \
state.o
 
include $(BASE)/config/config.mk
cppflags+= -I$(srctree)/drivers/linuxc26/include -I$(curdir)/../include \
-I$(curdir) -I$(curdir)/../
 
LIBRARY = glut
 
OBJS_PATH = $(BASE)/ports/mesa/src-glut.dos/
 
GLUT = bitmap.o color.o globals.o models.o teapot.o\
window.o callback.o init.o menu.o overlay.o state.o
 
OBJS = $(GLUT)
 
C_OPT += -I../../../drivers/linuxc26/include -I../include -I. -I..
 
include $(BASE)/config/lib.mk
 
/shark/branches/xen/ports/mesa/src/tnl/Makefile
0,0 → 1,24
targets:= \
t_array_api.o \
t_import_array.o \
t_context.o \
t_eval_api.o \
t_imm_alloc.o \
t_imm_api.o \
t_imm_debug.o \
t_imm_dlist.o \
t_imm_elt.o \
t_imm_eval.o \
t_imm_exec.o \
t_imm_fixup.o \
t_pipeline.o \
t_vb_fog.o \
t_vb_light.o \
t_vb_normals.o \
t_vb_points.o \
t_vb_program.o \
t_vb_render.o \
t_vb_gentex.o \
t_vb_texmat.o \
t_vb_vertex.o
 
/shark/branches/xen/ports/mesa/src/math/Makefile
0,0 → 1,10
targets:= \
m_clip_debug.o \
m_norm_debug.o \
m_xform_debug.o \
m_eval.o \
m_matrix.o \
m_translate.o \
m_vector.o \
m_xform.o
 
/shark/branches/xen/ports/mesa/src/swrast/Makefile
0,0 → 1,30
targets:= \
s_aaline.o \
s_aatriangle.o \
s_accum.o \
s_alphabuf.o \
s_alpha.o \
s_bitmap.o \
s_blend.o \
s_buffers.o \
s_context.o \
s_copypix.o \
s_depth.o \
s_drawpix.o \
s_feedback.o \
s_fog.o \
s_histogram.o \
s_imaging.o \
s_lines.o \
s_logic.o \
s_masking.o \
s_pixeltex.o \
s_points.o \
s_readpix.o \
s_span.o \
s_stencil.o \
s_texstore.o \
s_texture.o \
s_triangle.o \
s_zoom.o
 
/shark/branches/xen/ports/mesa/src/array_cache/Makefile
0,0 → 1,2
targets:= ac_context.o ac_import.o
 
/shark/branches/xen/ports/mesa/src/Makefile
1,50 → 1,71
# The Frame Buffer Device
targets:= libosmesa.a
 
ifndef BASE
BASE=../../..
endif
libosmesa.a-objs:= \
accum.o \
api_arrayelt.o \
api_eval.o \
api_loopback.o \
api_noop.o \
api_validate.o \
attrib.o \
blend.o \
buffers.o \
clip.o \
colortab.o \
context.o \
convolve.o \
debug.o \
depth.o \
dispatch.o \
dlist.o \
drawpix.o \
enable.o \
enums.o \
eval.o \
extensions.o \
feedback.o \
fog.o \
get.o \
glapi.o \
glthread.o \
hash.o \
hint.o \
histogram.o \
image.o \
light.o \
lines.o \
matrix.o \
mmath.o \
pixel.o \
points.o \
polygon.o \
rastpos.o \
state.o \
stencil.o \
texcompress.o \
texformat.o \
teximage.o \
texobj.o \
texstate.o \
texstore.o \
texutil.o \
varray.o \
vpexec.o \
vpparse.o \
vpstate.o \
vtxfmt.o \
array_cache/ \
swrast/ \
swrastst/ \
tnl/ \
math/ \
x86/ \
osmesa/ \
imports.o
 
include $(BASE)/config/config.mk
exported-aflags:= -I$(srctree)/drivers/linuxc26/include/asm \
-I$(srctree)/ports/mesa/include
 
LIBRARY = osmesa
exported-cppflags:= -I$(srctree)/drivers/linuxc26/include \
-I$(srctree)/ports/mesa/include -I$(srctree)/ports/mesa/src
 
OBJS_PATH = $(BASE)/ports/mesa/src/
 
OSMESA = accum.o api_arrayelt.o api_eval.o api_loopback.o api_noop.o api_validate.o\
attrib.o blend.o buffers.o clip.o colortab.o context.o convolve.o\
debug.o depth.o dispatch.o dlist.o drawpix.o enable.o enums.o eval.o\
extensions.o feedback.o fog.o get.o glapi.o glthread.o hash.o hint.o\
histogram.o image.o light.o lines.o matrix.o mmath.o pixel.o\
points.o polygon.o rastpos.o state.o stencil.o texcompress.o texformat.o\
teximage.o texobj.o texstate.o texstore.o texutil.o varray.o vpexec.o\
vpparse.o vpstate.o vtxfmt.o ./array_cache/ac_context.o\
./array_cache/ac_import.o ./swrast/s_aaline.o ./swrast/s_aatriangle.o\
./swrast/s_accum.o ./swrast/s_alphabuf.o ./swrast/s_alpha.o ./swrast/s_bitmap.o\
./swrast/s_blend.o ./swrast/s_buffers.o ./swrast/s_context.o ./swrast/s_copypix.o\
./swrast/s_depth.o ./swrast/s_drawpix.o ./swrast/s_feedback.o ./swrast/s_fog.o\
./swrast/s_histogram.o ./swrast/s_imaging.o ./swrast/s_lines.o ./swrast/s_logic.o\
./swrast/s_masking.o ./swrast/s_pixeltex.o ./swrast/s_points.o ./swrast/s_readpix.o\
./swrast/s_span.o ./swrast/s_stencil.o ./swrast/s_texstore.o ./swrast/s_texture.o\
./swrast/s_triangle.o ./swrast/s_zoom.o ./swrastst/ss_context.o\
./swrastst/ss_triangle.o ./swrastst/ss_vb.o ./tnl/t_array_api.o\
./tnl/t_import_array.o ./tnl/t_context.o ./tnl/t_eval_api.o ./tnl/t_imm_alloc.o\
./tnl/t_imm_api.o ./tnl/t_imm_debug.o ./tnl/t_imm_dlist.o ./tnl/t_imm_elt.o\
./tnl/t_imm_eval.o ./tnl/t_imm_exec.o ./tnl/t_imm_fixup.o ./tnl/t_pipeline.o\
./tnl/t_vb_fog.o ./tnl/t_vb_light.o\
./tnl/t_vb_normals.o ./tnl/t_vb_points.o ./tnl/t_vb_program.o ./tnl/t_vb_render.o\
./tnl/t_vb_gentex.o ./tnl/t_vb_texmat.o ./tnl/t_vb_vertex.o\
./math/m_clip_debug.o ./math/m_norm_debug.o\
./math/m_xform_debug.o ./math/m_eval.o ./math/m_matrix.o ./math/m_translate.o\
./math/m_vector.o ./math/m_xform.o\
./x86/asm_common_x86.o ./x86/common_x86.o ./x86/glapi_x86.o\
./x86/mmx_blend.o ./x86/x86.o ./x86/x86_cliptest.o ./x86/xform2_x86.o\
./x86/xform3_x86.o ./x86/xform4_x86.o ./osmesa/osmesa.o imports.o \
OBJS = $(OSMESA)
 
C_OPT += -I../../../drivers/linuxc26/include -I../include -I. -I..
 
ASM_OPT += -I../../../drivers/linuxc26/include/asm -I../include -I. -I..
 
include $(BASE)/config/lib.mk
 
/shark/branches/xen/ports/mesa/src/swrastst/Makefile
0,0 → 1,2
targets:= ss_context.o ss_triangle.o ss_vb.o
 
/shark/branches/xen/ports/mesa/src/x86/Makefile
0,0 → 1,11
targets:= \
asm_common_x86.o \
common_x86.o \
glapi_x86.o \
mmx_blend.o \
x86.o \
x86_cliptest.o \
xform2_x86.o \
xform3_x86.o \
xform4_x86.o
 
/shark/branches/xen/ports/mesa/src/osmesa/Makefile
0,0 → 1,2
targets:= osmesa.o
 
/shark/branches/xen/ports/mesa/src-glu/Makefile
1,21 → 1,18
# The Frame Buffer Device
targets:= libglu.a
 
ifndef BASE
BASE=../../..
endif
libglu.a-objs:= \
glu.o \
mipmap.o \
nurbs.o \
nurbsutl.o \
project.o \
tess.o \
nurbscrv.o \
nurbssrf.o \
polytest.o \
quadric.o \
tesselat.o
 
include $(BASE)/config/config.mk
cppflags+= -I$(srctree)/drivers/linuxc26/include -I$(curdir)/../include \
-I$(curdir) -I$(curdir)/../
 
LIBRARY = glu
 
OBJS_PATH = $(BASE)/ports/mesa/src-glu/
 
GLU = glu.o mipmap.o nurbs.o nurbsutl.o project.o tess.o\
nurbscrv.o nurbssrf.o polytest.o quadric.o tesselat.o
 
OBJS = $(GLU)
 
C_OPT += -I../../../drivers/linuxc26/include -I../include -I. -I..
 
include $(BASE)/config/lib.mk
 
/shark/branches/xen/ports/mesa/Makefile
1,43 → 1,5
targets:= \
src/ \
src-glu/ \
src-glut.dos/
 
dirs := $(filter-out CVS cvs makefile readme include, $(wildcard *))
p_all := $(addprefix prefixall_, $(dirs))
p_install := $(addprefix prefixinstall_, $(dirs))
p_clean := $(addprefix prefixclean_, $(dirs))
pcleanall := $(addprefix prefixcleanall_, $(dirs))
pdepend := $(addprefix prefixdepend_, $(dirs))
 
 
.PHONY: all install clean cleanall depend
 
install: $(p_install)
 
all: $(p_all)
 
clean: $(p_clean)
 
cleanall: $(p_cleanall)
 
depend: $(pdepend)
 
prefixinstall_%:
make -C $* install
 
prefixall_%:
make -C $* all
 
prefixclean_%:
make -C $* clean
 
prefixcleanall_%:
make -C $* cleanall
 
prefixdepend_%:
make -C $* depend
 
 
 
 
 
 
 
 
/shark/branches/xen/ports/Makefile
1,0 → 0,0
targets:=
targets:= mesa/ servo/ tftp/
 
/shark/branches/xen/ports/tftp/Makefile
1,20 → 1,6
# TFTP
targets:= libtftp.a
 
ifndef BASE
BASE=../..
endif
libtftp.a-objs:= tftp.o endn.o
 
include $(BASE)/config/config.mk
cppflags+= -I$(srctree)/ports/tftp/include -I$(srctree)/drivers/net/include/
 
LIBRARY = tftp
 
OBJS_PATH = $(BASE)/ports/tftp
 
OBJS = tftp.o endn.o
 
OTHERINCL += -I$(BASE)/ports/tftp/include -I$(BASE)/drivers/net/include/
 
include $(BASE)/config/lib.mk
 
clean::
rm -f *.o
/shark/branches/xen/ports/servo/Makefile
1,20 → 1,6
# Servo Control
targets:= libservo.a
 
ifndef BASE
BASE=../..
endif
libservo.a-objs:= servo.o
 
include $(BASE)/config/config.mk
cppflags+= -I$(curdir)/include -I$(curdir) -I$(srctree)/drivers/serial/include
 
LIBRARY = servo
 
OBJS_PATH = $(BASE)/ports/servo
 
SERVO = servo.o
 
OBJS = $(SERVO)
 
C_OPT += -I./include -I. -I$(BASE)/drivers/serial/include
 
include $(BASE)/config/lib.mk
 
/shark/branches/xen/libc/utsname/Makefile
1,2 → 1,2
targets:= utsname.c
targets:= utsname.o
 
/shark/branches/xen/libc/arch/x86/stdlib/Makefile
3,7 → 3,5
stdlib.o \
strtod.o \
strtoi.o \
strtol.o \
strtou.o \
strtoul.o
strtou.o
 
/shark/branches/xen/libc/arch/x86/libm/msun/src/Makefile
1,166 → 1,139
targets:=$(addsuffix .o,$(filter-out $(patsubst %.s,%,$(wildcard ../*.s)), \
$(patsubst %.c,%,$(wildcard *.c))))
targets:= \
e_acosf.o \
e_acosh.o \
e_acoshf.o \
e_asinf.o \
e_atan2f.o \
e_atanh.o \
e_atanhf.o \
e_cosh.o \
e_coshf.o \
e_expf.o \
e_fmod.o \
e_fmodf.o \
e_gamf1.o \
e_gamma.o \
e_gamma_.o \
e_gammaf.o \
e_hypot.o \
e_hypotf.o \
e_j0.o \
e_j0f.o \
e_j1.o \
e_j1f.o \
e_jn.o \
e_jnf.o \
e_lgam1.o \
e_lgam2.o \
e_lgam3.o \
e_lgamma.o \
e_log10f.o \
e_logf.o \
e_pow.o \
e_powf.o \
e_rem1.o \
e_rem2.o \
e_rem_pi.o \
e_scalbf.o \
e_sinh.o \
e_sinhf.o \
e_sqrtf.o \
k_cos.o \
k_cosf.o \
k_rem1.o \
k_rem_pi.o \
k_sin.o \
k_sinf.o \
k_standa.o \
k_tan.o \
k_tanf.o \
s_asinh.o \
s_asinhf.o \
s_atanf.o \
s_cbrt.o \
s_cbrtf.o \
s_ceilf.o \
s_copy1.o \
s_cosf.o \
s_erf.o \
s_erff.o \
s_expm1.o \
s_expm1f.o \
s_fabs.o \
s_fabsf.o \
s_fini1.o \
s_floorf.o \
s_frexp.o \
s_frexpf.o \
s_ilogbf.o \
s_isnan.o \
s_isnanf.o \
s_ldexp.o \
s_ldexpf.o \
s_lib_ve.o \
s_log1pf.o \
s_logbf.o \
s_mather.o \
s_modf.o \
s_modff.o \
s_next1.o \
s_nextaf.o \
s_rintf.o \
s_scal1.o \
s_sign1.o \
s_signga.o \
s_sinf.o \
s_tanf.o \
s_tanh.o \
s_tanhf.o \
w_acos.o \
w_acosf.o \
w_acosh.o \
w_acoshf.o \
w_asin.o \
w_asinf.o \
w_atan2.o \
w_atan2f.o \
w_atanh.o \
w_atanhf.o \
w_cabs.o \
w_cabsf.o \
w_cosh.o \
w_coshf.o \
w_drem.o \
w_dremf.o \
w_exp.o \
w_expf.o \
w_fmod.o \
w_fmodf.o \
w_gamf1.o \
w_gamma.o \
w_gamma_.o \
w_gammaf.o \
w_hypot.o \
w_hypotf.o \
w_j0.o \
w_j0f.o \
w_j1.o \
w_j1f.o \
w_jn.o \
w_jnf.o \
w_lgam1.o \
w_lgam2.o \
w_lgam3.o \
w_lgamma.o \
w_log.o \
w_log10.o \
w_log10f.o \
w_logf.o \
w_pow.o \
w_powf.o \
w_rem1.o \
w_remain.o \
w_scalb.o \
w_scalbf.o \
w_sinh.o \
w_sinhf.o \
w_sqrt.o \
w_sqrtf.o
 
#
# \
# e_acos.o \
# e_acosf.o \
# e_acosh.o \
# e_acoshf.o \
# e_asin.o \
# e_asinf.o \
# e_atan2.o \
# e_atan2f.o \
# e_atanh.o \
# e_atanhf.o \
# e_cosh.o \
# e_coshf.o \
# e_exp.o \
# e_expf.o \
# e_fmod.o \
# e_fmodf.o \
# e_gamf1.o \
# e_gamma.o \
# e_gamma_.o \
# e_gammaf.o \
# e_hypot.o \
# e_hypotf.o \
# e_j0.o \
# e_j0f.o \
# e_j1.o \
# e_j1f.o \
# e_jn.o \
# e_jnf.o \
# e_lgam1.o \
# e_lgam2.o \
# e_lgam3.o \
# e_lgamma.o \
# e_log.o \
# e_log10.o \
# e_log10f.o \
# e_logf.o \
# e_pow.o \
# e_powf.o \
# e_rem1.o \
# e_rem2.o \
# e_rem_pi.o \
# e_remain.o \
# e_scalb.o \
# e_scalbf.o \
# e_sinh.o \
# e_sinhf.o \
# e_sqrt.o \
# e_sqrtf.o \
# k_cos.o \
# k_cosf.o \
# k_rem1.o \
# k_rem_pi.o \
# k_sin.o \
# k_sinf.o \
# k_standa.o \
# k_tan.o \
# k_tanf.o \
# s_asinh.o \
# s_asinhf.o \
# s_atan.o \
# s_atanf.o \
# s_cbrt.o \
# s_cbrtf.o \
# s_ceil.o \
# s_ceilf.o \
# s_copy1.o \
# s_copysi.o \
# s_cos.o \
# s_cosf.o \
# s_erf.o \
# s_erff.o \
# s_expm1.o \
# s_expm1f.o \
# s_fabs.o \
# s_fabsf.o \
# s_fini1.o \
# s_finite.o \
# s_floor.o \
# s_floorf.o \
# s_frexp.o \
# s_frexpf.o \
# s_ilogb.o \
# s_ilogbf.o \
# s_isnan.o \
# s_isnanf.o \
# s_ldexp.o \
# s_ldexpf.o \
# s_lib_ve.o \
# s_log1p.o \
# s_log1pf.o \
# s_logb.o \
# s_logbf.o \
# s_mather.o \
# s_modf.o \
# s_modff.o \
# s_next1.o \
# s_nextaf.o \
# s_rint.o \
# s_rintf.o \
# s_scal1.o \
# s_scalbn.o \
# s_sign1.o \
# s_signga.o \
# s_signif.o \
# s_sin.o \
# s_sinf.o \
# s_tan.o \
# s_tanf.o \
# s_tanh.o \
# s_tanhf.o \
# w_acos.o \
# w_acosf.o \
# w_acosh.o \
# w_acoshf.o \
# w_asin.o \
# w_asinf.o \
# w_atan2.o \
# w_atan2f.o \
# w_atanh.o \
# w_atanhf.o \
# w_cabs.o \
# w_cabsf.o \
# w_cosh.o \
# w_coshf.o \
# w_drem.o \
# w_dremf.o \
# w_exp.o \
# w_expf.o \
# w_fmod.o \
# w_fmodf.o \
# w_gamf1.o \
# w_gamma.o \
# w_gamma_.o \
# w_gammaf.o \
# w_hypot.o \
# w_hypotf.o \
# w_j0.o \
# w_j0f.o \
# w_j1.o \
# w_j1f.o \
# w_jn.o \
# w_jnf.o \
# w_lgam1.o \
# w_lgam2.o \
# w_lgam3.o \
# w_lgamma.o \
# w_log.o \
# w_log10.o \
# w_log10f.o \
# w_logf.o \
# w_pow.o \
# w_powf.o \
# w_rem1.o \
# w_remain.o \
# w_scalb.o \
# w_scalbf.o \
# w_sinh.o \
# w_sinhf.o \
# w_sqrt.o \
# w_sqrtf.o
#
/shark/branches/xen/libc/arch/x86/libm/msun/i387/Makefile
3,7 → 3,6
e_asin.o \
e_atan2.o \
e_exp.o \
e_fmod.o \
e_log.o \
e_log10.o \
e_remain.o \
/shark/branches/xen/libc/arch/x86/libm/machine/Makefile
1,2 → 1,2
targets:= infinity.o
targets:= stub.o
 
/shark/branches/xen/libc/arch/x86/Makefile
1,4 → 1,4
targets:= modf.o reboot.o ioformat/ libm/ stdlib/ string/
targets:= reboot.o ioformat/ libm/ stdlib/ string/
 
exported-aflags:= -I.
exported-cppflags:= -I.
/shark/branches/xen/libc/libio/Makefile
12,5 → 12,5
umask.o \
unlink.o \
wrappers.o \
write.c
write.o
 
/shark/branches/xen/arch/x86/Makefile
1,30 → 1,36
targets:= \
abort.o \
advtimer.o \
aspace.o \
ccpu.o \
cpu2.o \
ctx.o \
cxsw-2.o \
ctxsw.o \
event.o \
event1.o \
exc.o \
fpu.o \
idtinit.o \
init.o \
intevt.o \
irq.o \
mem.o \
time.o \
aspace.o \
intevt.o \
event.o \
event1.o \
advtimer.o \
abort.o \
timeint.o \
libx0.a \
xinfo.o \
vm86.o \
x1.o \
xsystab.o \
xbios.o \
xconv.o \
xdosf.o \
xdosm.o \
ccpu.o \
fpu.o \
irq.o \
ctxsw.o \
xinfo.o \
xsystab.o \
xinit.o \
idtinit.o \
vm86.o \
xbios.o
xsys0.o
 
libx0.a-objs:= x0.o
install-objs:= x0.o
 
cppflags+= -I$(srctree)/libc/arch/$(ARCH)/include
aflags+= -D__VIRCSW__
cppflags+= -I$(srctree)/libc/arch/$(ARCH)/include -D__VIRCSW__
 
/shark/branches/xen/Makefile
39,15 → 39,14
in-local:= $$(subst $$(srctree)/,,$$<)
out-local:= $$(subst install-,,$$(subst $$(objtree)/,,$$@))
in-objs:= $$(filter %.o,$$^)
in-objs-local:= $$(filter %.o,$$(subst $$(objtree)/,,$$^))
 
# The rule patterns, in quiet and in verbose form. The verbose form is
# used also for the actual command.
quiet_ar_cmd := ' AR\\t$(out-local) $(in-objs-local)'
quiet_ar_cmd := ' AR\\t$(out-local)'
ar_cmd := $(ar) cr $$@ $(in-objs)
 
quiet_cc_cmd := ' CC\\t$(in-local)'
cc_cmd := $(cc) $$(cflags-$$(<:.c=.o)) $$(cppflags-$$(<:.c=.o)) \
cc_cmd := $(cc) $$(cflags-$$(<:.c=.o)) $$(cppflags-$$(<:.c=.o))\
-c $$< -o $$@
 
quiet_as_cmd := ' AS\\t$(in-local)'
54,14 → 53,19
as_cmd := $(as) $$(aflags-$$(<:.s=.o)) -c $$< -o $$@
 
quiet_dep_cmd := ' DEP\\t$(in-local)'
dep_cmd := $(cc) $$(cflags-$$(<:.c=.o)) $$(cppflags-$$(<:.c=.o)) \
dep_cmd := $(cc) $$(cflags-$$(<:.c=.o)) $$(cppflags-$$(<:.c=.o))\
-M -MT \
"$$(subst $$(srctree),$$(objtree),$$(<:.c=.o))\
$$@" $$< > $$@ 2>/dev/null
 
quiet_ld-r_cmd := ' LD\\t$(out-local) $(in-objs-local)'
ld-r_cmd := $(ld) $$(ldflags-$$(dir $$@)) -r $(in-objs) -o $$@
quiet_ld-r_cmd := ' LD [R]\\t$(out-local)'
ld-r_cmd := $(ld) $$(ldflags-$$(dir $$@)) $$(ldflags-$$@)\
-r $(in-objs) -o $$@
 
quiet_ld_cmd := ' LD\\t$(out-local)'
ld_cmd := $(ld) $$(ldflags-$$(dir $$@)) $$(startup-$$@) $(in-objs)\
$$(ldflags-$$@) -o $$@
 
quiet_rm_cmd := ' RM\\t$$(subst clean-,,$$(subst distclean-,,$(out-local)))'
rm_cmd := -$(rm) $$(subst clean-,,$$(subst distclean-,,$$@))
 
78,10 → 82,16
endef
 
# Remove duplicate slashes, ../'s, trailing slashes and so on from paths.
define clean-path
$(dir $(abspath $(1)))$(notdir $(abspath $(1)))
endef
clean-path=$(dir $(abspath $(1)))$(notdir $(abspath $(1)))
 
# Canonicalize a path, converting .. and . $(1) is the current directory,
# and $(2) are the paths to be converted.
to-local-path=$(subst $(1)/,,$(abspath $(addprefix $(1)/,$(2))))
 
# Keep only paths in $(1) that start with ./ (i.e., that are relative to the
# current directory.)
keep-local=$(foreach p, $(1),$(if $(subst ./,,$(dir $(p))),,$(p)))
 
# Adjust the paths for all the prerequisites of a target. Given a list
# of objects, with relative or absolute path, figure out the right paths
# in the build directory. Leave the output in $(target-objs).
99,18 → 109,19
$$(call clean-path,$$(dir)))
endef
 
# Produce targets for a given library.
define lib-templ
lib:=$(1)
lib-target:=$$(objdir)/$$(lib)
# Produce targets for a given library/application.
define libapp-templ
libapp:=$(1)
is-app:=$(strip $(2))
libapp-target:=$$(objdir)/$$(libapp)
 
# Get a list of all the prerequisites needed to build the library.
# Get a list of all the prerequisites needed to build the library/application.
$$(eval $$(call all-prerequisites-templ,\
$$(patsubst %/,%/obj.o,$$($$(lib)-objs))))
$$(patsubst %/,%/obj.o,$$($$(libapp)-objs))))
 
$$(foreach flag,$(flags),$$(eval $$(call flags-per-target,$$(flag),$$(lib))))
$$(foreach flag,$(flags),$$(eval $$(call flags-per-target,$$(flag),$$(libapp))))
$$(foreach obj,$$(target-objs),\
$$(eval $$(call flags-per-objects,$$(obj),$$(lib))))
$$(eval $$(call flags-per-objects,$$(obj),$$(libapp))))
 
# Produce the real target, in $(objtree), and the user-friendly target,
# with a relative path to $(srctree). Note that even when the two trees
117,25 → 128,33
# are equal we define two targets; a possible optimization could be to
# use relative paths for the object tree in this case, but the code can
# become even less readable than it is now...
$$(lib-target): $$(target-objs)
ifeq ($$(is-app),true)
startup-$$(libapp-target):= $$($$(libapp)-startup)
$$(libapp-target): $$(target-objs)
$(call cmd,ld)
else
$$(libapp-target): $$(target-objs)
$(call cmd,ar)
short-lib-taget:=$$(subst $$(srctree)/,,$$(curdir)/$$(lib))
.PHONY: $$(short-lib-target)
$$(short-lib-target): $$(lib-target)
endif
short-libapp-taget:=$$(subst $$(srctree)/,,$$(curdir)/$$(libapp))
.PHONY: $$(short-libapp-target)
$$(short-libapp-target): $$(libapp-target)
 
# Update the $(subdirs) for $(curdir) and its target list.
subdirs+=$$(filter %/,$$($$(lib)-objs))
curdir-targets+=$$(lib-target)
subdirs+=$$(filter %/,$$($$(libapp)-objs))
curdir-targets+=$$(libapp-target)
 
.PHONY: clean-$$(lib-target)
clean-$$(lib-target):
.PHONY: clean-$$(libapp-target)
clean-$$(libapp-target):
$(call cmd,rm)
curdir-clean-targets+= clean-$$(lib-target)
curdir-clean-targets+= clean-$$(libapp-target)
 
.PHONY: install-$$(lib-target)
install-$$(lib-target): $$(lib-target)
ifneq ($$(is-app),true)
.PHONY: install-$$(libapp-target)
install-$$(libapp-target): $$(libapp-target)
$(call cmd,install)
curdir-install-targets+= install-$$(lib-target)
curdir-install-targets+= install-$$(libapp-target)
endif
endef
 
# Produce the needed code for a given object.
166,6 → 185,12
curdir-clean-targets+= clean-$$(obj-target)
curdir-distclean-targets+= distclean-$$(obj-dep)
 
ifneq ($$(filter $$(obj),$$(install-objs)),)
.PHONY: install-$$(obj-target)
install-$$(obj-target): $$(obj-target)
$(call cmd,install)
curdir-install-targets+= install-$$(obj-target)
endif
endef
 
# Handle the flags for the current directory. for each *FLAGS variable
214,12 → 239,14
target:=$(2)
 
$$(flag)-$$(curdir)/$$(target):=$$($$(flag)-$$(curdir)) \
$$($$(target)-$$(flag)) $$(extra-$$(flag)-$$(curdir)/$$(target))
$$($$(target)-$$(flag)) $$(extra-$$(flag)-$$(curdir)/$$(target))
 
ifneq ($$(target),install-objs)
# Those are the flags coming from the upper directories, they are set for
# obj.o targets, we must export them to our children, so we leave them here.
exported-$$(flag)-$$(curdir)/$$(target):= $$($$(target)-$$(flag)) \
$$(extra-$$(flag)-$$(curdir)/$$(target))
endif
$$(target)-$$(flag):=
endef
 
233,12 → 260,14
 
# The flags for a given object are the ones specified for its target
# plus any specific one.
$$(flag)-$$(curdir)/$$(this-obj):=$$($$(flag)-$$(curdir)/$$(target)) \
$$(flag)-$$(curdir)/$$(this-obj):= $$($$(flag)-$$(curdir)/$$(target))\
$$($$(this-obj)-$$(flag))
$$(this-obj)-$$(flag):=
 
#to-print+= [ $$(flag)-$$(curdir)/$$(this-obj) = $$($$(flag)-$$(curdir)/$$(this-obj)) ] RET
ifeq ($(3),install-objs)
to-print+= [ $(2) $(3) ] RET
endif
endif
# Pass the right flags to the subdirs we use to build $(target).
ifeq ($$(notdir $(2)),obj.o)
extra-$$(flag)-$(2):= $$(exported-$$(flag)-$$(curdir)/$$(target))
312,6 → 341,8
curdir-distclean-targets:=
curdir-install-targets:=
 
install-objs:=
 
# If the output directory does not exist every target that actually
# needs it will have to create it.
ifneq ($(objtree),$(srctree))
340,6 → 371,7
subdirs:=$$(filter %/, $$(targets))
objs:=$$(filter %.o, $$(targets))
libs:=$$(filter %.a, $$(targets))
apps:=$$(filter-out $$(subdirs) $$(objs) $$(libs),$$(targets))
 
$$(eval $$(call all-prerequisites-templ, $$(subdirs)))
subdir-targets:= $$(target-objs)
372,9 → 404,13
 
# Produce the needed targets for each library.
ifneq ($$(strip $$(libs)),)
$$(foreach lib,$$(libs),$$(eval $$(call lib-templ,$$(lib))))
$$(foreach lib,$$(libs),$$(eval $$(call libapp-templ,$$(lib),false)))
endif
 
ifneq ($$(strip $$(apps)),)
$$(foreach app,$$(apps),$$(eval $$(call libapp-templ,$$(app),true)))
endif
 
# Produce a target for each local object. Build the list of all the
# targets specified by the current subdir. It is given by all the local
# objects in $(targets) or in a library contained in it. Non-local
387,16 → 423,35
# First build a relative path for all the .o files in the targets (the
# default one and the library ones,) taking care of not being confused
# by relative directory specifications.
all-local-objs-paths:=$$(subst $$(curdir)/,,\
$$(abspath $$(addprefix $$(curdir)/,\
$$(objs) $$(foreach lib,$$(libs),$$(filter %.o,$$($$(lib)-objs))))))
#all-local-objs-paths:=$$(subst $$(curdir)/,,\
# $$(abspath $$(addprefix $$(curdir)/,\
# $$(objs) $$(install-objs)\
# $$(foreach lib,$$(libs),$$(filter %.o,$$($$(lib)-objs)))\
# $$(foreach app,$$(apps),$$(filter %.o,$$($$(app)-objs))))))
all-local-objs-paths:=$$(call to-local-path,$$(curdir),\
$$(objs)\
$$(foreach lib,$$(libs),$$(filter %.o,$$($$(lib)-objs)))\
$$(foreach app,$$(apps),$$(filter %.o,$$($$(app)-objs))))
 
all-local-install-objs-paths:=$$(call to-local-path,$$(curdir),\
$$(install-objs))
 
# Then keep only those with a dir equal to ./ A local object is not
# allowed to be specified with a path specifying a directory different
# from the current one.
all-local-objs:=$$(foreach obj, $$(all-local-objs-paths), \
$$(if $$(subst ./,,$$(dir $$(obj))),,$$(obj)))
# from the current one. Objects to be installed are only taken into
# account if they're local to the current directory.
#all-local-objs:=$$(foreach obj, $$(all-local-objs-paths),\
# $$(if $$(subst ./,,$$(dir $$(obj))),,$$(obj)))
all-local-install-objs:=$$(call keep-local,$$(all-local-install-objs-paths))
all-local-objs:=$$(call keep-local,$$(all-local-objs-paths))\
$$(all-local-install-objs)
 
$$(eval $$(call all-prerequisites-templ,$$(all-local-install-objs)))
$$(foreach flag,$(flags),\
$$(eval $$(call flags-per-target,$$(flag),install-objs)))
$$(foreach obj,$$(target-objs),\
$$(eval $$(call flags-per-objects,$$(obj),install-objs)))
 
# Produce one target per object, and the rules to build them along with
# their dependencies.
ifneq ($$(strip $$(all-local-objs)),)
452,57 → 507,11
 
.DEFAULT_GOAL:= all
 
include shark.cfg
 
installdir:=$(objtree)/.lib
 
# Handle Shark configuration. Really insane, indeed.
options:=TSC APIC BIOS TRACER FG FB COMPILER
define strip-in-place
$(1):=$(strip $($(1)))
endef
$(foreach cfgopt,$(options),$(eval $(call strip-in-place,$(cfgopt))))
# Include all the Shark specific configuration...
include $(if $(S),$(S)/)Rules.mk
 
cpp-tsc-TRUE:= -D__TSC__
cpp-apic-TRUE:= -D__APIC__
cpp-bios-VM86:= -DVM86
cpp-tracer-NEW:= -D__NEW_TRACER__
cpp-tracer-OLD:= -D__OLD_TRACER__
cpp-fg-FORCE_PXC:= -D__FORCE_PXC__
cpp-fb-VESA:= -DCONFIG_FB_VESA -DCONFIG_LOGO
cpp-fb-FINDPCI:= -DCONFIG_FB_RIVA -DCONFIG_FB_RADEON -DCONFIG_FB_MATROX \
-DCONFIG_LOGO -DCONFIG_FB_MATROX_G100 \
-DCONFIG_FB_MATROX_MILLENIUM -DCONFIG_FB_MATROX_MYSTIQUE
cpp-fb-VGA16:= -DCONFIG_FB_VGA16
 
include-dirs:= \
-I$(srctree)/include -I$(srctree)/modules \
-I$(srctree)/arch/$(ARCH)/include/arch \
-I$(srctree)/libc/arch/$(ARCH)/include \
-I$(srctree)/tracer/include
 
config:= -D__LINUX__ \
$(cpp-tsc-$(TSC)) $(cpp-apic-$(APIC)) $(cpp-bios-$(BIOS)) \
$(cpp-tracer-$(TRACER)) $(cpp-fg-$(FG)) $(cpp-fb-$(FB))
 
exported-cppflags:= $(include-dirs) $(config)
exported-aflags:= -x assembler-with-cpp $(include-dirs) $(config)
 
cc-compiler-GCC4:= -Wimplicit-function-declaration -Wno-attributes \
-Wno-pointer-sign -Wall -O -fno-builtin -nostdinc \
-minline-all-stringops -fno-stack-protector
cc-compiler-GCC3:= -Wimplicit-function-declaration -Wall -O \
-fno-builtin -nostdinc -minline-all-stringops
cc-compiler-DJGPP:= -Wimplicit-function-declaration -Wall -O \
-fno-builtin -nostdinc -minline-all-stringops
 
exported-cflags:= $(cc-compiler-$(COMPILER))
 
fs-YES:= fs/
 
targets:= libgkern.a drivers/ libc/ ports/ tracer/ $(fs-$(SHARK_FS))
libgkern.a-objs:= arch/$(ARCH)/ kernel/ modules/
 
# Let the good times roll...
$(eval $(call recurse-templ,$(srctree)))
 
/shark/branches/xen/drivers/pci6025e/Makefile
1,6 → 1,6
targets:= lib6025e.a
 
lib6026e.a-objs:= \
lib6025e.a-objs:= \
pci6025e.o \
tim/ \
dac/ \