Rev 3 | 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 | # Standard library for X/COFF applications |
||
5 | # Makefile for GNU MAKE & GCC 2.8.0 |
||
6 | |||
7 | ifndef BASE |
||
40 | pj | 8 | BASE = .. |
9 | BASEDOS = .. |
||
2 | pj | 10 | endif |
11 | |||
40 | pj | 12 | include $(BASE)/config.mk |
2 | pj | 13 | |
40 | pj | 14 | #C_OPT += -DPROFILE |
15 | #ASM_OPT += -DPROFILE |
||
2 | pj | 16 | |
40 | pj | 17 | COMMON_OBJS = reboot.o |
18 | |||
2 | pj | 19 | STRING_OBJS = strncat.o \ |
20 | strrchr.o \ |
||
21 | strstr.o \ |
||
22 | string.o \ |
||
23 | special.o \ |
||
24 | strnum.o \ |
||
25 | strbase.o |
||
26 | |||
27 | IO_OBJS = ecvt.o \ |
||
28 | fcvt.o \ |
||
29 | gcvt.o \ |
||
30 | sprintf.o \ |
||
31 | ksprintf.o \ |
||
32 | sscanf.o \ |
||
33 | ucvt.o |
||
34 | |||
35 | STD_OBJS = random.o \ |
||
36 | stdlib.o \ |
||
37 | strtod.o \ |
||
38 | strtoi.o \ |
||
39 | strtol.o \ |
||
40 | strtou.o \ |
||
41 | strtoul.o |
||
42 | |||
43 | GNU_S_OBJS = modf.o |
||
44 | |||
45 | GNU_C_OBJS = |
||
46 | |||
47 | OBJS = $(GNU_S_OBJS) $(GNU_C_OBJS) $(COMMON_OBJS) $(STRING_OBJS) $(IO_OBJS) $(STD_OBJS) |
||
48 | |||
49 | vpath %.c string stdlib ioformat |
||
50 | #VPATH := $(subst $(space),:,$(SRCDIRS) $(MOSTLY_SRCDIRS)) |
||
51 | |||
52 | .PHONY : clean allclean info |
||
53 | |||
54 | info : |
||
55 | @echo "OSLib Makefile" |
||
56 | @echo "Chose: all, install, clean" |
||
57 | |||
58 | |||
59 | all : libhc.a |
||
60 | |||
61 | libs : libhc.a |
||
62 | |||
63 | install : libhc.a $(LIB_DIR) |
||
64 | $(CP) libhc.a $(LIB_DIR) |
||
65 | |||
66 | $(LIB_DIR) : |
||
67 | $(MKDIR) $(LIB_DIR) |
||
68 | clean : |
||
69 | $(RM) *.o |
||
70 | $(RM) *.err |
||
71 | $(RM) libhc.a |
||
72 | |||
73 | allclean : |
||
74 | echo # XTN Library dependencies > deps |
||
40 | pj | 75 | $(RM) $(LIB_PATH)libhc.a |
2 | pj | 76 | |
77 | deps: $(COMMON_OBJS:.o=.c) $(patsubst %.o,string/%.c,$(STRING_OBJS)) $(patsubst %.o,ioformat/%.c,$(IO_OBJS)) $(patsubst %.o,stdlib/%.c,$(STD_OBJS)) |
||
40 | pj | 78 | $(CC) -E $(C_OPT) -M $(COMMON_OBJS:.o=.c) \ |
2 | pj | 79 | $(patsubst %.o,string/%.c,$(STRING_OBJS)) \ |
80 | $(patsubst %.o,ioformat/%.c,$(IO_OBJS)) \ |
||
81 | $(patsubst %.o,stdlib/%.c,$(STD_OBJS)) > deps |
||
82 | |||
83 | # |
||
84 | # The library!! |
||
85 | # |
||
86 | libhc.a : $(OBJS) |
||
87 | $(AR) rs libhc.a $(OBJS) |
||
88 | |||
89 | ifeq (deps,$(wildcard deps)) |
||
90 | include deps |
||
91 | endif |