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