Rev 1408 | Rev 1627 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1408 | Rev 1412 | ||
---|---|---|---|
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 -O2 $(INCLUDES) $(DEFINES) -fomit-frame-pointer -fno-builtin-printf |
10 | |
10 | 11 | NAME:= libdrv |
|
11 | NAME:= libdrv |
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 | malloc/malloc.c \ |
23 | linux/firmware.c \ |
23 | stdio/icompute.c \ |
24 | linux/list_sort.c \ |
- | 25 | malloc/malloc.c \ |
|
- | 26 | stdio/icompute.c \ |
|
- | 27 | stdio/vsprintf.c \ |
|
24 | stdio/vsprintf.c \ |
28 | stdio/doprnt.c \ |
25 | stdio/doprnt.c \ |
29 | stdio/chartab.c \ |
26 | stdio/chartab.c \ |
30 | string/_memmove.S \ |
27 | string/_memmove.S \ |
31 | string/_strncat.S \ |
28 | string/_strncat.S \ |
32 | string/_strncmp.S \ |
29 | string/_strncmp.S \ |
33 | string/_strncpy.S \ |
30 | string/_strncpy.S \ |
34 | string/_strnlen.S \ |
31 | string/_strnlen.S \ |
35 | string/memcpy.S \ |
32 | string/memcpy.S \ |
36 | string/memcmp.S \ |
33 | string/memcmp.S \ |
37 | string/memset.S \ |
34 | string/memset.S \ |
38 | string/strcat.S \ |
35 | string/strcat.S \ |
39 | string/strchr.S \ |
36 | string/strchr.S \ |
40 | string/strcpy.S \ |
37 | string/strcpy.S \ |
41 | string/strncpy.S \ |
38 | string/strncpy.S \ |
42 | string/strncmp.S \ |
39 | string/strncmp.S \ |
43 | string/strlen.S |
40 | string/strlen.S |
44 | |
41 | 45 | ||
42 | 46 | ||
43 | 47 | NAME_OBJS = $(patsubst %.S, %.o, $(patsubst %.asm, %.o,\ |
|
44 | NAME_OBJS = $(patsubst %.S, %.o, $(patsubst %.asm, %.o,\ |
48 | $(patsubst %.c, %.o, $(NAME_SRCS)))) |
45 | $(patsubst %.c, %.o, $(NAME_SRCS)))) |
49 | |
46 | 50 | ||
47 | 51 | TARGET = $(NAME).a |
|
48 | TARGET = $(NAME).a |
52 | |
49 | 53 | all: $(TARGET) libcore.a |
|
50 | all: $(TARGET) libcore.a |
54 | |
51 | 55 | ||
52 | 56 | $(TARGET): $(NAME_OBJS) $(NAME_SRC) Makefile |
|
53 | $(TARGET): $(NAME_OBJS) $(NAME_SRC) Makefile |
57 | $(AR) cvrs $@ $(NAME_OBJS) |
54 | $(AR) cvrs $@ $(NAME_OBJS) |
58 | |
55 | 59 | ||
56 | 60 | libcore.a: core.S Makefile |
|
57 | libcore.a: core.S Makefile |
61 | $(AS) -o core.o $< |
58 | $(AS) -o core.o $< |
62 | $(LD) -shared -s --out-implib $@ --output-def core.def -o core.dll core.o |
59 | $(LD) -shared -s --out-implib $@ --output-def core.def -o core.dll core.o |
63 | |
60 | 64 | %.o: %.S Makefile |
|
61 | %.o: %.S Makefile |
65 | $(AS) -o $@ $< |
62 | $(AS) -o $@ $< |
66 | |
63 | 67 | %.o: %.c Makefile |
|
64 | %.o: %.c Makefile |
68 | $(CC) $(CFLAGS) -o $@ $<> |
65 | $(CC) $(CFLAGS) -o $@ $<> |
69 | |
66 | 70 | %.o:> |
|
67 | %.o:> |
71 | > |
68 | > |
- |