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