Subversion Repositories Kolibri OS

Rev

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

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