Subversion Repositories shark

Rev

Rev 3 | Rev 120 | 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__
17
 
18
#C_OPT += -DPROFILE
19
#ASM_OPT += -DPROFILE
40 pj 20
KL_C_OBJ = mem.o \
2 pj 21
	cxsw-2.o \
22
	init.o \
23
	time.o \
24
	aspace.o \
25
	intevt.o \
26
	event.o \
27
	event1.o
28
 
29
KL_OBJ = $(KL_C_OBJ) abort.o timeint.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
40 pj 57
	$(RM) $(LIB_PATH)libkl.a
2 pj 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