Subversion Repositories shark

Rev

Rev 353 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 pj 1
# Standard library for X/COFF kernel
2
# Makefile for GNU MAKE & GCC 2.8.0
3
 
4
#
5
# Standard path
6
#
7
 
8
ifndef BASE
40 pj 9
	BASE = ..
10
	BASEDOS = ..
2 pj 11
endif
12
 
40 pj 13
include $(BASE)/config.mk
2 pj 14
 
15
C_OPT += -D__VIRCSW__
16
ASM_OPT += -D__VIRCSW__
353 giacomo 17
INCL += -I$(BASE)/../tracer/include
2 pj 18
 
19
#C_OPT += -DPROFILE
20
#ASM_OPT += -DPROFILE
40 pj 21
KL_C_OBJ = mem.o \
2 pj 22
	cxsw-2.o \
23
	init.o \
24
	time.o \
25
	aspace.o \
26
	intevt.o \
27
	event.o \
120 giacomo 28
	event1.o \
29
	advtimer.o
2 pj 30
 
31
KL_OBJ = $(KL_C_OBJ) abort.o timeint.o
32
 
33
#
34
# Ok! Finally the dependency rules!
35
# We do not mess with automatic depencencies here!!
36
#
37
 
38
.PHONY : all clean info install
39
 
40
info :
41
	@echo "OSLib Makefile"
42
	@echo "Chose: all, install, clean"
43
 
44
 
45
all : libkl.a
46
 
47
install : libkl.a $(LIB_DIR)
48
	$(CP) libkl.a $(LIB_DIR)
49
 
50
$(LIB_DIR) :
51
	$(MKDIR) $(LIB_DIR)
52
clean :
53
	$(RM) *.o
54
	$(RM) *.err
55
	$(RM) libkl.a
56
 
57
allclean : clean
58
	echo # Kernel Dependency file > deps
40 pj 59
	$(RM) $(LIB_PATH)libkl.a
2 pj 60
 
61
deps :$(KL_C_OBJ:.o=.c)
62
	$(CC) $(C_OPT) $(KLINCL) -M $(KL_C_OBJ:.o=.c) > deps
63
 
64
libkl.a : $(KL_OBJ)
65
	$(AR) rs libkl.a $(KL_OBJ)
66
 
67
etest: estub.o event.o
68
	gcc estub.o event.o -o etest
69
 
70
ifeq (deps,$(wildcard deps))
71
include deps
72
endif