2010-06-18 18:39:07 +04:00
|
|
|
|
2011-09-15 01:43:11 +04:00
|
|
|
|
2010-06-18 18:39:07 +04:00
|
|
|
CC = gcc
|
|
|
|
FASM = e:/fasm/fasm.exe
|
|
|
|
|
|
|
|
CFLAGS = -c -O2 -fomit-frame-pointer -fno-builtin-printf
|
|
|
|
|
2011-09-15 01:43:11 +04:00
|
|
|
|
2010-06-18 18:39:07 +04:00
|
|
|
DRV_DIR = $(CURDIR)/..
|
|
|
|
|
|
|
|
DRV_INCLUDES = $(DRV_DIR)/include
|
|
|
|
|
|
|
|
ACPI_INCLUDES = ./acpica/include
|
|
|
|
|
|
|
|
INCLUDES = -I$(DRV_INCLUDES) -I$(ACPI_INCLUDES) -I$(DRV_DIR)/include/linux
|
|
|
|
|
|
|
|
DEFINES = -D__KERNEL__ -DCONFIG_X86_32
|
|
|
|
|
|
|
|
LDFLAGS = -nostdlib -shared -s -Map acpi.map --image-base 0\
|
|
|
|
--file-alignment 512 --section-alignment 4096
|
|
|
|
|
2010-06-18 18:59:06 +04:00
|
|
|
LIBPATH:= -L$(DRV_DIR)/ddk -L./acpica
|
2010-06-18 18:39:07 +04:00
|
|
|
|
2010-09-26 11:30:13 +04:00
|
|
|
LIBS:= -lacpica -lgcc -lddk -lcore
|
2010-06-18 18:39:07 +04:00
|
|
|
|
|
|
|
|
|
|
|
NAME= acpi
|
|
|
|
|
2010-09-27 02:57:18 +04:00
|
|
|
NAME_SRCS= acpi.c \
|
|
|
|
scan.c \
|
|
|
|
pci_irq.c \
|
2010-09-27 15:30:31 +04:00
|
|
|
pci_root.c \
|
2010-09-29 15:59:24 +04:00
|
|
|
pci/access.c \
|
2010-09-27 15:30:31 +04:00
|
|
|
pci/pci.c \
|
|
|
|
pci/probe.c \
|
|
|
|
pci_bind.c
|
2010-06-18 18:39:07 +04:00
|
|
|
|
|
|
|
|
|
|
|
all: $(NAME).dll
|
|
|
|
|
|
|
|
NAME_OBJS = $(patsubst %.S, %.o, $(patsubst %.asm, %.o,\
|
|
|
|
$(patsubst %.c, %.o, $(NAME_SRCS))))
|
|
|
|
|
|
|
|
|
|
|
|
$(NAME).dll: $(NAME_OBJS) acpi.lds Makefile
|
2010-09-26 11:30:13 +04:00
|
|
|
ld $(LIBPATH) $(LDFLAGS) -T acpi.lds -o $@ $(NAME_OBJS) $(LIBS)
|
|
|
|
kpack $(NAME).dll
|
2010-06-18 18:39:07 +04:00
|
|
|
|
|
|
|
%.o : %.c $(HFILES) Makefile
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
|
|
|
|
|
|
|
|
%.o : %.S $(HFILES) Makefile
|
|
|
|
as -o $@ $<
|
|
|
|
|
|
|
|
|
|
|
|
|