Subversion Repositories Kolibri OS

Rev

Rev 6336 | Rev 9057 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6336 Rev 6587
1
CC = gcc
1
CC = gcc
2
AS = as
2
AS = as
3
 
3
 
4
DRV_TOPDIR   = $(CURDIR)/..
4
DRV_TOPDIR   = $(CURDIR)/..
5
DRV_INCLUDES = $(DRV_TOPDIR)/include
5
DRV_INCLUDES = $(DRV_TOPDIR)/include
6
 
6
 
7
 
7
 
8
INCLUDES =	-I$(DRV_INCLUDES)	\
8
INCLUDES =	-I$(DRV_INCLUDES)	\
9
		-I$(DRV_INCLUDES)/asm 	\
9
		-I$(DRV_INCLUDES)/asm 	\
10
		-I$(DRV_INCLUDES)/uapi
10
		-I$(DRV_INCLUDES)/uapi
11
 
11
 
12
DEFINES = -DKOLIBRI -D__KERNEL__ -DCONFIG_X86_32 -DCONFIG_DMI -DCONFIG_TINY_RCU
12
DEFINES = -DKOLIBRI -D__KERNEL__ -DCONFIG_X86_32 -DCONFIG_DMI -DCONFIG_TINY_RCU
13
DEFINES+= -DCONFIG_X86_L1_CACHE_SHIFT=6 -DCONFIG_ARCH_HAS_CACHE_LINE_SIZE
13
DEFINES+= -DCONFIG_X86_L1_CACHE_SHIFT=6 -DCONFIG_ARCH_HAS_CACHE_LINE_SIZE
14
DEFINES+= -DCONFIG_PRINTK
14
DEFINES+= -DCONFIG_PRINTK
15
 
15
 
16
CFLAGS = 	-c -Os $(INCLUDES) $(DEFINES) -march=i686 -fomit-frame-pointer -fno-builtin-printf \
16
CFLAGS = 	-c -Os $(INCLUDES) $(DEFINES) -march=i686 -fomit-frame-pointer -fno-builtin-printf \
17
-mno-stack-arg-probe -mpreferred-stack-boundary=2 -mincoming-stack-boundary=2 -fno-ident
17
-mno-stack-arg-probe -mpreferred-stack-boundary=2 -mincoming-stack-boundary=2 -fno-ident
18
 
18
 
19
NAME:=	  libddk
19
NAME:=	  libddk
20
 
20
 
21
CORE_SRC=	core.S
21
CORE_SRC=	core.S
22
 
22
 
23
 
23
 
24
NAME_SRCS:=  				\
24
NAME_SRCS:=  				\
25
		debug/dbglog.c		\
25
		debug/dbglog.c		\
26
		debug/chkstk.S		\
26
		debug/chkstk.S		\
27
		dma/dma_alloc.c		\
27
		dma/dma_alloc.c		\
28
		dma/fence.c		\
28
		dma/fence.c		\
29
           	io/create.c		\
29
           	io/create.c		\
30
           	io/finfo.c		\
30
           	io/finfo.c		\
31
           	io/ssize.c		\
31
           	io/ssize.c		\
32
           	io/write.c		\
32
           	io/write.c		\
33
		linux/bitmap.c		\
33
		linux/bitmap.c		\
34
		linux/ctype.c		\
34
		linux/ctype.c		\
35
		linux/dmapool.c		\
35
		linux/div64.c		\
-
 
36
		linux/dmapool.c		\
36
		linux/dmi.c		\
37
		linux/dmi.c		\
37
		linux/fbsysfs.c		\
38
		linux/fbsysfs.c		\
38
		linux/find_next_bit.c	\
39
		linux/find_next_bit.c	\
39
		linux/firmware.c	\
40
		linux/firmware.c	\
40
		linux/gcd.c		\
41
		linux/gcd.c		\
41
		linux/hdmi.c		\
42
		linux/hdmi.c		\
42
		linux/hexdump.c		\
43
		linux/hexdump.c		\
43
		linux/idr.c		\
44
		linux/idr.c		\
44
		linux/interval_tree.c	\
45
		linux/interval_tree.c	\
45
		linux/kasprintf.c	\
46
		linux/kasprintf.c	\
46
		linux/kmap.c		\
47
		linux/kmap.c		\
47
		linux/list_sort.c	\
48
		linux/list_sort.c	\
48
		linux/mutex.c		\
49
		linux/mutex.c		\
49
		linux/rbtree.c		\
50
		linux/rbtree.c		\
50
		linux/scatterlist.c	\
51
		linux/scatterlist.c	\
51
		linux/string.c		\
52
		linux/string.c		\
52
		linux/time.c		\
53
		linux/time.c		\
53
		linux/workqueue.c	\
54
		linux/workqueue.c	\
54
		malloc/malloc.c		\
55
		malloc/malloc.c		\
55
		stdio/vsprintf.c	\
56
		stdio/vsprintf.c	\
56
		string/strstr.c		\
57
		string/strstr.c		\
57
		string/_memmove.S 	\
58
		string/_memmove.S 	\
58
		string/_strncat.S 	\
59
		string/_strncat.S 	\
59
		string/_strncmp.S 	\
60
		string/_strncmp.S 	\
60
		string/_strncpy.S 	\
61
		string/_strncpy.S 	\
61
		string/_strnlen.S 	\
62
		string/_strnlen.S 	\
62
		string/bcmp.S 		\
63
		string/bcmp.S 		\
63
		string/bcopy.S 		\
64
		string/bcopy.S 		\
64
		string/bzero.S 		\
65
		string/bzero.S 		\
65
		string/index.S 		\
66
		string/index.S 		\
66
		string/memchr.S 	\
67
		string/memchr.S 	\
67
		string/memcmp.S 	\
68
		string/memcmp.S 	\
68
		string/memcpy.S 	\
69
		string/memcpy.S 	\
69
		string/memmove.S 	\
70
		string/memmove.S 	\
70
		string/memset.S 	\
71
		string/memset.S 	\
71
		string/rindex.S 	\
72
		string/rindex.S 	\
72
		string/strcat.S 	\
73
		string/strcat.S 	\
73
		string/strchr.S 	\
74
		string/strchr.S 	\
74
		string/strcmp.S 	\
75
		string/strcmp.S 	\
75
		string/strcpy.S 	\
76
		string/strcpy.S 	\
76
		string/strlen.S 	\
77
		string/strlen.S 	\
77
		string/strncat.S 	\
78
		string/strncat.S 	\
78
		string/strncmp.S 	\
79
		string/strncmp.S 	\
79
		string/strncpy.S 	\
80
		string/strncpy.S 	\
80
		string/strnlen.S 	\
81
		string/strnlen.S 	\
81
		string/strrchr.S 
82
		string/strrchr.S 
82
 
83
 
83
 
84
 
84
 
85
 
85
NAME_OBJS =  $(patsubst %.S, %.o, $(patsubst %.asm, %.o,\
86
NAME_OBJS =  $(patsubst %.S, %.o, $(patsubst %.asm, %.o,\
86
             $(patsubst %.c, %.o, $(NAME_SRCS))))
87
             $(patsubst %.c, %.o, $(NAME_SRCS))))
87
 
88
 
88
 
89
 
89
TARGET  = $(NAME).a 
90
TARGET  = $(NAME).a 
90
 
91
 
91
all: $(TARGET) libcore.a
92
all: $(TARGET) libcore.a
92
 
93
 
93
 
94
 
94
$(TARGET): $(NAME_OBJS) $(NAME_SRC) Makefile
95
$(TARGET): $(NAME_OBJS) $(NAME_SRC) Makefile
95
	$(AR) cvrs $@ $(NAME_OBJS)
96
	$(AR) cvrs $@ $(NAME_OBJS)
96
 
97
 
97
 
98
 
98
libcore.a: core.S Makefile
99
libcore.a: core.S Makefile
99
	$(AS) -o core.o $<
100
	$(AS) -o core.o $<
100
	$(LD) -shared -s --out-implib $@ --output-def core.def -o core.dll core.o
101
	$(LD) -shared -s --out-implib $@ --output-def core.def -o core.dll core.o
101
	
102
	
102
%.o: %.S Makefile
103
%.o: %.S Makefile
103
	$(CC) $(CFLAGS) -o $@ $<
104
	$(CC) $(CFLAGS) -o $@ $<
104
 
105
 
105
%.o: %.c Makefile ../include/*.h ../include/linux/*.h
106
%.o: %.c Makefile ../include/*.h ../include/linux/*.h
106
	$(CC) $(CFLAGS) -o $@ $<
107
	$(CC) $(CFLAGS) -o $@ $<
107
 
108
 
108
clean: 
109
clean: 
109
	-rm -f */*.o
110
	-rm -f */*.o
110
 
111
 
111
clean:>
112
clean:>
112
 
113
 
113
%.o:>
114
%.o:>
114
>
115
>