Subversion Repositories shark

Rev

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