1#
2# Makefile for alpha-specific library files..
3#
4
5.S.s:
6	$(CPP) -D__ASSEMBLY__ $(CFLAGS) -o $*.s $<
7.S.o:
8	$(CC) -D__ASSEMBLY__ $(CFLAGS) -c -o $*.o $<
9
10# Many of these routines have implementations tuned for ev6.
11# Choose them iff we're targeting ev6 specifically.
12ev6 :=
13ifeq ($(CONFIG_ALPHA_EV6),y)
14  ev6 := ev6-
15endif
16
17# Several make use of the cttz instruction introduced in ev67.
18ev67 :=
19ifeq ($(CONFIG_ALPHA_EV67),y)
20  ev67 := ev67-
21endif
22
23OBJS =	__divqu.o __remqu.o __divlu.o __remlu.o \
24	udelay.o \
25	$(ev6)memset.o \
26	$(ev6)memcpy.o \
27	memmove.o \
28	io.o \
29	checksum.o \
30	csum_partial_copy.o \
31	$(ev67)strlen.o \
32	$(ev67)strcat.o \
33	strcpy.o \
34	$(ev67)strncat.o \
35	strncpy.o \
36	$(ev6)stxcpy.o \
37	$(ev6)stxncpy.o \
38	$(ev67)strchr.o \
39	$(ev67)strrchr.o \
40	$(ev6)memchr.o \
41	$(ev6)copy_user.o \
42	$(ev6)clear_user.o \
43	$(ev6)strncpy_from_user.o \
44	$(ev67)strlen_user.o \
45	$(ev6)csum_ipv6_magic.o \
46	$(ev6)clear_page.o \
47	$(ev6)copy_page.o \
48	strcasecmp.o \
49	fpreg.o \
50	callback_srm.o srm_puts.o srm_printk.o
51
52ifeq ($(CONFIG_SMP),y)
53  OBJS += dec_and_lock.o
54endif
55
56lib.a: $(OBJS)
57	$(AR) rcs lib.a $(OBJS)
58
59__divqu.o: $(ev6)divide.S
60	$(CC) $(AFLAGS) -DDIV -c -o __divqu.o $(ev6)divide.S
61
62__remqu.o: $(ev6)divide.S
63	$(CC) $(AFLAGS) -DREM -c -o __remqu.o $(ev6)divide.S
64
65__divlu.o: $(ev6)divide.S
66	$(CC) $(AFLAGS) -DDIV -DINTSIZE -c -o __divlu.o $(ev6)divide.S
67
68__remlu.o: $(ev6)divide.S
69	$(CC) $(AFLAGS) -DREM -DINTSIZE -c -o __remlu.o $(ev6)divide.S
70
71dep:
72
73include $(TOPDIR)/Rules.make
74