mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-11-25 18:29:36 +03:00
8848af8de1
- Fixed errors breaking build; - Added to auto build; git-svn-id: svn://kolibrios.org@9499 a494cfbc-eb01-0410-851d-a64ba20cac60
43 lines
1.2 KiB
Makefile
43 lines
1.2 KiB
Makefile
CC = kos32-gcc
|
|
LD = kos32-ld
|
|
KPACK = kpack
|
|
|
|
CFLAGS = -c -w -O2 -fomit-frame-pointer -fno-builtin-printf
|
|
|
|
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
|
|
|
|
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
|
|
|
|
LDFLAGS = -nostdlib -shared -s -Map acpi.map --image-base 0 --file-alignment 512 --section-alignment 4096
|
|
|
|
LIBPATH := -L$(DRV_DIR)/ddk -L../devman/acpica -L../../contrib/sdk/lib
|
|
LIBS := -lacpica -lgcc -lddk -lcore
|
|
|
|
NAME = acpi.sys
|
|
|
|
NAME_SRCS = acpi.c \
|
|
scan.c \
|
|
pci_root.c \
|
|
pci_bind.c \
|
|
pci_irq.c \
|
|
pci/probe.c \
|
|
pci/pci.c \
|
|
pci/access.c
|
|
|
|
all: $(NAME)
|
|
|
|
NAME_OBJS = $(patsubst %.S, %.o, $(patsubst %.asm, %.o, \
|
|
$(patsubst %.c, %.o, $(NAME_SRCS))))
|
|
|
|
|
|
$(NAME): $(NAME_OBJS) ../devman/acpi.lds Makefile
|
|
$(LD) $(LIBPATH) $(LDFLAGS) -T ../devman/acpi.lds -o $@ $(NAME_OBJS) $(LIBS)
|
|
$(KPACK) $(NAME)
|
|
|
|
%.o : %.c $(HFILES) Makefile
|
|
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
|
|
|
|
clean:
|
|
rm -rf *.o
|