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