Subversion Repositories Kolibri OS

Rev

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

Rev 1627 Rev 1764
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 
9
CFLAGS = 	-c -O2 $(INCLUDES) $(DEFINES) -fomit-frame-pointer -fno-builtin-printf 
9
CFLAGS = 	-c -Os $(INCLUDES) $(DEFINES) -march=i486 -fomit-frame-pointer -fno-builtin-printf 
10
 
10
 
11
NAME:=	  libddk
11
NAME:=	  libddk
12
 
12
 
13
CORE_SRC=	core.S
13
CORE_SRC=	core.S
14
 
14
 
15
 
15
 
16
NAME_SRCS:=  				\
16
NAME_SRCS:=  				\
17
		debug/dbglog.c		\
17
		debug/dbglog.c		\
18
           	io/create.c		\
18
           	io/create.c		\
19
           	io/finfo.c		\
19
           	io/finfo.c		\
20
           	io/ssize.c		\
20
           	io/ssize.c		\
21
           	io/write.c		\
21
           	io/write.c		\
22
		linux/idr.c		\
22
		linux/idr.c		\
23
		linux/firmware.c	\
23
		linux/firmware.c	\
24
		linux/list_sort.c	\
24
		linux/list_sort.c	\
25
		linux/dmapool.c		\
25
		linux/dmapool.c		\
26
		malloc/malloc.c		\
26
		malloc/malloc.c		\
27
		stdio/icompute.c	\
27
		stdio/icompute.c	\
28
		stdio/vsprintf.c	\
28
		stdio/vsprintf.c	\
29
		stdio/doprnt.c		\
29
		stdio/doprnt.c		\
30
		stdio/chartab.c		\
30
		stdio/chartab.c		\
31
		string/_memmove.S 	\
31
		string/_memmove.S 	\
32
		string/_strncat.S 	\
32
		string/_strncat.S 	\
33
		string/_strncmp.S 	\
33
		string/_strncmp.S 	\
34
		string/_strncpy.S 	\
34
		string/_strncpy.S 	\
35
		string/_strnlen.S 	\
35
		string/_strnlen.S 	\
36
		string/bcmp.S 		\
36
		string/bcmp.S 		\
37
		string/bcopy.S 		\
37
		string/bcopy.S 		\
38
		string/bzero.S 		\
38
		string/bzero.S 		\
39
		string/index.S 		\
39
		string/index.S 		\
40
		string/memchr.S 	\
40
		string/memchr.S 	\
41
		string/memcmp.S 	\
41
		string/memcmp.S 	\
42
		string/memcpy.S 	\
42
		string/memcpy.S 	\
43
		string/memmove.S 	\
43
		string/memmove.S 	\
44
		string/memset.S 	\
44
		string/memset.S 	\
45
		string/rindex.S 	\
45
		string/rindex.S 	\
46
		string/strcat.S 	\
46
		string/strcat.S 	\
47
		string/strchr.S 	\
47
		string/strchr.S 	\
48
		string/strcmp.S 	\
48
		string/strcmp.S 	\
49
		string/strcpy.S 	\
49
		string/strcpy.S 	\
50
		string/strlen.S 	\
50
		string/strlen.S 	\
51
		string/strncat.S 	\
51
		string/strncat.S 	\
52
		string/strncmp.S 	\
52
		string/strncmp.S 	\
53
		string/strncpy.S 	\
53
		string/strncpy.S 	\
54
		string/strnlen.S 	\
54
		string/strnlen.S 	\
55
		string/strrchr.S 
55
		string/strrchr.S 
56
 
56
 
57
 
57
 
58
 
58
 
59
NAME_OBJS =  $(patsubst %.S, %.o, $(patsubst %.asm, %.o,\
59
NAME_OBJS =  $(patsubst %.S, %.o, $(patsubst %.asm, %.o,\
60
             $(patsubst %.c, %.o, $(NAME_SRCS))))
60
             $(patsubst %.c, %.o, $(NAME_SRCS))))
61
 
61
 
62
 
62
 
63
TARGET  = $(NAME).a 
63
TARGET  = $(NAME).a 
64
 
64
 
65
all: $(TARGET) libcore.a
65
all: $(TARGET) libcore.a
66
 
66
 
67
 
67
 
68
$(TARGET): $(NAME_OBJS) $(NAME_SRC) Makefile
68
$(TARGET): $(NAME_OBJS) $(NAME_SRC) Makefile
69
	$(AR) cvrs $@ $(NAME_OBJS)
69
	$(AR) cvrs $@ $(NAME_OBJS)
70
 
70
 
71
 
71
 
72
libcore.a: core.S Makefile
72
libcore.a: core.S Makefile
73
	$(AS) -o core.o $<
73
	$(AS) -o core.o $<
74
	$(LD) -shared -s --out-implib $@ --output-def core.def -o core.dll core.o
74
	$(LD) -shared -s --out-implib $@ --output-def core.def -o core.dll core.o
75
	
75
	
76
%.o: %.S Makefile
76
%.o: %.S Makefile
77
	$(CC) $(CFLAGS) -o $@ $<
77
	$(CC) $(CFLAGS) -o $@ $<
78
 
78
 
79
%.o: %.c Makefile
79
%.o: %.c Makefile
80
	$(CC) $(CFLAGS) -o $@ $<
80
	$(CC) $(CFLAGS) -o $@ $<
81
 
81
 
82
%.o:>
82
%.o:>
83
>
83
>