Rev 40 | 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 applications |
2 | # Makefile for GNU MAKE & GCC 2.8.0 |
||
3 | |||
4 | ifndef BASE |
||
40 | pj | 5 | BASE = .. |
6 | BASEDOS = .. |
||
2 | pj | 7 | endif |
8 | |||
40 | pj | 9 | include $(BASE)/config.mk |
2 | pj | 10 | |
11 | C_OPT += -D__VIRCSW__ |
||
12 | ASM_OPT += -D__VIRCSW__ |
||
13 | |||
14 | #C_OPT += -DPROFILE |
||
15 | #ASM_OPT += -DPROFILE |
||
16 | |||
17 | COMMON_OBJS = xinfo.o \ |
||
18 | x1.o \ |
||
19 | xsystab.o \ |
||
20 | xconv.o \ |
||
21 | xdosf.o \ |
||
40 | pj | 22 | xdosm.o \ |
2 | pj | 23 | ccpu.o \ |
24 | fpu.o \ |
||
25 | irq.o \ |
||
26 | ctxsw.o \ |
||
27 | xinit.o \ |
||
40 | pj | 28 | idtinit.o \ |
2 | pj | 29 | vm86.o \ |
30 | xbios.o |
||
31 | |||
40 | pj | 32 | GNU_S_OBJS = xsys0.o cpu2.o exc.o ctx.o mem.o |
2 | pj | 33 | #GNU_C_OBJS = gnucomp.o |
34 | |||
35 | OBJS = $(GNU_S_OBJS) $(GNU_C_OBJS) $(COMMON_OBJS) |
||
36 | |||
37 | .PHONY : clean allclean info install |
||
38 | |||
39 | info : |
||
40 | @echo "OSLib Makefile" |
||
41 | @echo "Chose: all, install, clean" |
||
42 | |||
43 | all : libhx.a x0.o |
||
44 | |||
45 | libs : libhx.a |
||
46 | |||
47 | install : libhx.a x0.o $(LIB_DIR) |
||
48 | $(CP) libhx.a $(LIB_DIR) |
||
49 | $(CP) x0.o $(LIB_DIR) |
||
50 | |||
51 | $(LIB_DIR) : |
||
52 | $(MKDIR) $(LIB_DIR) |
||
53 | |||
54 | clean : |
||
55 | $(RM) *.o |
||
56 | $(RM) *.err |
||
57 | $(RM) libhx.a |
||
58 | |||
59 | allclean : |
||
60 | echo # XTN Library dependencies > deps |
||
40 | pj | 61 | $(RM) $(LIB_PATH)libhx.a |
62 | $(RM) $(LIB_PATH)x0.o |
||
2 | pj | 63 | |
64 | deps: $(COMMON_OBJS:.o=.c) $(patsubst %.o,gnu/%.c,$(GNU_C_OBJS)) |
||
40 | pj | 65 | $(CC) $(C_OPT) -M $(COMMON_OBJS:.o=.c) $(patsubst %.o,gnu/%.c,$(GNU_C_OBJS)) > deps |
2 | pj | 66 | |
67 | # |
||
68 | # The library!! |
||
69 | # |
||
70 | libhx.a : $(OBJS) |
||
71 | $(AR) rs libhx.a $(OBJS) |
||
72 | |||
73 | ifeq (deps,$(wildcard deps)) |
||
74 | include deps |
||
75 | endif |