Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1622 → Rev 1621

/shark/branches/xen/mkf/makefile.libm
0,0 → 1,93
# Standard library for X/COFF kernel
# Makefile for GNU MAKE & GCC 2.8.0
 
#
# Standard path
#
 
ifndef BASE
BASE = ../..
BASEDOS = ..\..
endif
 
include $(BASE)/config/config.mk
 
C_INC= -I. -I$(BASE)/include/ll -I$(BASE)/include
C_OPT += -Dlint -Wno-uninitialized -Wno-parentheses
ASM_OPT += -Dlint -I.
 
# by Massy
# so there is no conflict with standard libC library
C_OPT += -Dwrite=ll_internal_write
 
SRCDIRS = msun/src msun/i387 machine
space := $(empty) $(empty)
 
vpath %.s msun/i387
vpath %.c msun/src machine
 
# First find a list of every file that might possibly be a source file,
# so we only have to scan the source directories once.
FILES := $(foreach DIR,$(SRCDIRS),$(wildcard $(DIR)/*))
 
 
# C source files
CFILES := $(filter %.c,$(FILES))
SFILES := $(filter %.s,$(FILES))
 
 
# The generated object files have the same prefix names as the source files,
# except they live in the current (object) directory.
OBJFILES += $(patsubst %.s,%.o,$(notdir $(SFILES)))
OBJFILES += $(patsubst %.c,%.o,$(notdir $(CFILES)))
 
# This is to eliminate duplicate files,
# which might appear when files are being overridden.
OBJFILES := $(sort $(OBJFILES))
 
OBJS = $(STUB_OBJS) $(OBJFILES)
 
#
# Ok! Finally the dependency rules!
# We do not mess with automatic depencencies here!!
#
 
.PHONY : all clean info install
 
.SUFFIXES:
 
info :
@echo "OSLib Makefile"
@echo "Chose: all, install, clean"
 
all : libhm.a
 
install : libhm.a $(LIB_DIR)
$(CP) libhm.a $(LIB_DIR)
 
$(LIB_DIR) :
$(MKDIR) $(LIB_DIR)
clean :
$(RM) *.o
$(RM) *.err
$(RM) libhm.a
 
allclean : clean
echo # Kernel Dependency file > deps
$(RM) ..\lib\libhm.a
 
deps : $(OBJS:.o=.c)
$(CC) $(C_OPT) $(VMINCL) -M $(OBJS:.o=.c) > deps
 
libhm.a : $(OBJS)
$(AR) rs libhm.a $(OBJS)
 
deb:
type $(VPATH)
 
%.s:%.c
 
ifeq (deps,$(wildcard deps))
include deps
endif
/shark/branches/xen/mkf/makefile.kl
0,0 → 1,70
# Standard library for X/COFF kernel
# Makefile for GNU MAKE & GCC 2.8.0
 
#
# Standard path
#
 
ifndef BASE
BASE = ../..
BASEDOS = ..\..
endif
 
include $(BASE)/config/config.mk
 
C_OPT += -D__VIRCSW__
ASM_OPT += -D__VIRCSW__
 
C_OPT += -DPROFILE
ASM_OPT += -DPROFILE
KL_C_OBJ = stuff.o \
mem.o \
cxsw-2.o \
init.o \
time.o \
event.o \
event1.o \
aspace.o
 
KL_OBJ = $(KL_C_OBJ) cxsw-1.o
 
#
# Ok! Finally the dependency rules!
# We do not mess with automatic depencencies here!!
#
 
.PHONY : all clean info install
 
info :
@echo "OSLib Makefile"
@echo "Chose: all, install, clean"
 
all : libkl.a
 
install : libkl.a $(LIB_DIR)
$(CP) libkl.a $(LIB_DIR)
 
$(LIB_DIR) :
$(MKDIR) $(LIB_DIR)
clean :
$(RM) *.o
$(RM) *.err
$(RM) libkl.a
 
allclean : clean
echo # Kernel Dependency file > deps
$(RM) ..\lib\libkl.a
 
deps :$(KL_C_OBJ:.o=.c)
$(CC) $(C_OPT) $(KLINCL) -M $(KL_C_OBJ:.o=.c) > deps
 
libkl.a : $(KL_OBJ)
$(AR) rs libkl.a $(KL_OBJ)
 
etest: estub.o event.o
gcc estub.o event.o -o etest
 
ifeq (deps,$(wildcard deps))
include deps
endif