2021-12-27 19:22:14 +01:00
|
|
|
CC = kos32-gcc
|
|
|
|
LD = kos32-ld
|
|
|
|
KPACK = kpack
|
2010-06-18 16:39:07 +02:00
|
|
|
|
2021-12-27 19:22:14 +01:00
|
|
|
CFLAGS = -c -w -O2 -fomit-frame-pointer -fno-builtin-printf
|
2011-09-14 23:43:11 +02:00
|
|
|
|
2021-12-27 19:22:14 +01:00
|
|
|
DRV_DIR = $(CURDIR)/..
|
|
|
|
INCLUDES = -I$(DRV_DIR)/devman/acpica/include -I$(DRV_DIR)/devman -I$(DRV_DIR)/include/linux -I$(DRV_DIR)/include -I$(DRV_DIR)/include/uapi
|
2010-06-18 16:39:07 +02:00
|
|
|
|
2021-12-27 19:22:14 +01:00
|
|
|
DEFINES = -D__KERNEL__ -DCONFIG_X86_32 -DCONFIG_X86_L1_CACHE_SHIFT=6 -DCONFIG_ARCH_HAS_CACHE_LINE_SIZE -DHAVE_ACPICA -DCONFIG_ACPI -DLINUX_MOD_DEVICETABLE_H -DCONFIG_PCI
|
2010-06-18 16:39:07 +02:00
|
|
|
|
2021-12-27 19:22:14 +01:00
|
|
|
LDFLAGS = -nostdlib -shared -s -Map acpi.map --image-base 0 --file-alignment 512 --section-alignment 4096
|
2011-09-14 23:43:11 +02:00
|
|
|
|
2021-12-27 19:22:14 +01:00
|
|
|
LIBPATH := -L$(DRV_DIR)/ddk -L../devman/acpica -L../../contrib/sdk/lib
|
|
|
|
LIBS := -lacpica -lgcc -lddk -lcore
|
2010-06-18 16:39:07 +02:00
|
|
|
|
2021-12-27 19:22:14 +01:00
|
|
|
NAME = acpi.sys
|
2010-06-18 16:39:07 +02:00
|
|
|
|
2021-12-27 19:22:14 +01:00
|
|
|
NAME_SRCS = acpi.c \
|
|
|
|
scan.c \
|
|
|
|
pci_root.c \
|
|
|
|
pci_bind.c \
|
|
|
|
pci_irq.c \
|
|
|
|
pci/probe.c \
|
|
|
|
pci/pci.c \
|
|
|
|
pci/access.c
|
2010-06-18 16:39:07 +02:00
|
|
|
|
2021-12-27 19:22:14 +01:00
|
|
|
all: $(NAME)
|
2010-06-18 16:39:07 +02:00
|
|
|
|
2021-12-27 19:22:14 +01:00
|
|
|
NAME_OBJS = $(patsubst %.S, %.o, $(patsubst %.asm, %.o, \
|
2010-06-18 16:39:07 +02:00
|
|
|
$(patsubst %.c, %.o, $(NAME_SRCS))))
|
|
|
|
|
|
|
|
|
2021-12-27 19:22:14 +01:00
|
|
|
$(NAME): $(NAME_OBJS) ../devman/acpi.lds Makefile
|
|
|
|
$(LD) $(LIBPATH) $(LDFLAGS) -T ../devman/acpi.lds -o $@ $(NAME_OBJS) $(LIBS)
|
|
|
|
$(KPACK) $(NAME)
|
2010-06-18 16:39:07 +02:00
|
|
|
|
|
|
|
%.o : %.c $(HFILES) Makefile
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
|
|
|
|
|
2021-12-27 19:22:14 +01:00
|
|
|
clean:
|
|
|
|
rm -rf *.o
|