]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/io/server/src/Make.rules
update
[l4.git] / l4 / pkg / io / server / src / Make.rules
1 # vi:ft=make
2 #MODE   := shared
3 TARGET  = io
4
5 SRC_CC := main.cc pci.cc res.cc phys_space.cc resource.cc hw_device.cc \
6           hw_root_bus.cc device.cc vdevice.cc vproxy_dev.cc \
7           vpci.cc vpci_virtual_root.cc vpci_pci_bridge.cc vbus_factory.cc \
8           vbus.cc vicu.cc gpio.cc \
9           server.cc pci_iomem_root_bridge.cc vmsi.cc irqs.cc debug.cc \
10           vgpio.cc lua_glue.swg.cc
11
12 SRC_CC_legacy_cfg = cfg_scanner.cc cfg_scan.cc cfg_parser.tab.cc
13
14 SRC_CC += $(SRC_CC_legacy_cfg)
15 DEFINES += -DSUPPORT_LEGACY_CFG
16
17 SRC_CC_x86    = acpi.cc ux.cc acpi_osl.cc
18 SRC_CC_amd64  = acpi.cc ux.cc acpi_osl.cc
19 SRC_CC       += $(SRC_CC_$(ARCH))
20
21 REQUIRES_LIBS   = libsigma0 libstdc++ libpciids lua++
22 REQUIRES_LIBS_x86 = acpica
23 REQUIRES_LIBS_amd64 = acpica
24
25 REQUIRES_CFLAGS = libio-vbus libio-io
26 PRIVATE_INCDIR += $(SRC_DIR)
27
28
29 ifneq ($(REGEN_FILES),)
30 #ifneq ($(SRC_DIR),)
31 #all:: $(SRC_DIR)/lua_glue.swg.h $(SRC_DIR)/lua_glue.swg.cc
32 #endif
33
34 SWIG_RM_EXT_C ?= $(L4DIR)/tool/bin/swig-rm-extern-c.pl
35 SWIG ?= swig
36
37 %.swg:
38
39 $(SRC_DIR)/%.swg.cc: $(SRC_DIR)/%.swg.c_cc $(SRC_DIR)/Makefile
40         @$(GEN_MESSAGE)
41         $(VERBOSE)$(SWIG_RM_EXT_C) $< >$@
42
43 $(SRC_DIR)/%.swg.h: $(SRC_DIR)/%.swg.c_h
44         @$(GEN_MESSAGE)
45         $(VERBOSE)$(SWIG_RM_EXT_C) $< >$@
46
47 SWIG_INCDIR:=-I$(SRC_DIR) -I$(SRC_DIR)/../../include -I$(L4DIR)/pkg
48
49 $(SRC_DIR)/%.swg.c_cc: $(SRC_DIR)/%.swg $(SRC_DIR)/Makefile
50         @$(GEN_MESSAGE)
51         $(VERBOSE)$(SWIG) $(SWIG_INCDIR) -c++ -small -lua -o $@ $<
52
53 $(SRC_DIR)/%.swg.c_h:
54         @$(GEN_MESSAGE)
55         $(VERBOSE)$(SWIG) $(SWIG_INCDIR) -c++ -lua -small -external-runtime $@
56
57 endif