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