Subversion Repositories shark

Rev

Rev 2 | 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
9
	BASE = ../..
10
	BASEDOS = ..\..
11
endif
12
 
13
include $(BASE)/config/config.mk
14
 
15
C_OPT += -D__VIRCSW__
16
ASM_OPT += -D__VIRCSW__
17
 
18
C_OPT += -DPROFILE
19
ASM_OPT += -DPROFILE
20
KL_C_OBJ = stuff.o \
21
	mem.o \
22
	cxsw-2.o \
23
	init.o \
24
	time.o \
25
	event.o \
26
	event1.o \
27
	aspace.o
28
 
29
KL_OBJ = $(KL_C_OBJ) cxsw-1.o
30
 
31
#
32
# Ok! Finally the dependency rules!
33
# We do not mess with automatic depencencies here!!
34
#
35
 
36
.PHONY : all clean info install
37
 
38
info :
39
	@echo "OSLib Makefile"
40
	@echo "Chose: all, install, clean"
41
 
42
 
43
all : libkl.a
44
 
45
install : libkl.a $(LIB_DIR)
46
	$(CP) libkl.a $(LIB_DIR)
47
 
48
$(LIB_DIR) :
49
	$(MKDIR) $(LIB_DIR)
50
clean :
51
	$(RM) *.o
52
	$(RM) *.err
53
	$(RM) libkl.a
54
 
55
allclean : clean
56
	echo # Kernel Dependency file > deps
57
	$(RM) ..\lib\libkl.a
58
 
59
deps :$(KL_C_OBJ:.o=.c)
60
	$(CC) $(C_OPT) $(KLINCL) -M $(KL_C_OBJ:.o=.c) > deps
61
 
62
libkl.a : $(KL_OBJ)
63
	$(AR) rs libkl.a $(KL_OBJ)
64
 
65
etest: estub.o event.o
66
	gcc estub.o event.o -o etest
67
 
68
ifeq (deps,$(wildcard deps))
69
include deps
70
endif