Details | 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 | |||
21 | KL_C_OBJ = stuff.o \ |
||
22 | mem.o \ |
||
23 | cxsw-2.o \ |
||
24 | init.o \ |
||
25 | time.o \ |
||
26 | aspace.o \ |
||
27 | intevt.o \ |
||
28 | event.o \ |
||
29 | event1.o |
||
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 |
||
59 | $(RM) ..\lib\libkl.a |
||
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 |