1 # SPDX-License-Identifier: GPL-2.0-only 2 # Makefile for libcpupower's Python bindings 3 # 4 # This Makefile expects you have already run t 5 # the .o files in the lib directory for the bi 6 7 CC := gcc 8 HAVE_SWIG := $(shell if which swig >/dev/null 9 HAVE_PYCONFIG := $(shell if which python-confi 10 11 LIB_DIR := ../../lib 12 PY_INCLUDE = $(firstword $(shell python-config 13 OBJECTS_LIB = $(wildcard $(LIB_DIR)/*.o) 14 15 all: _raw_pylibcpupower.so 16 17 _raw_pylibcpupower.so: raw_pylibcpupower_wrap. 18 $(CC) -shared $(OBJECTS_LIB) raw_pylib 19 20 raw_pylibcpupower_wrap.o: raw_pylibcpupower_wr 21 $(CC) -fPIC -c raw_pylibcpupower_wrap. 22 23 raw_pylibcpupower_wrap.c: raw_pylibcpupower.sw 24 ifeq ($(HAVE_SWIG),0) 25 $(error "swig was not found. Make sure 26 else ifeq ($(HAVE_PYCONFIG),0) 27 $(error "python-config was not found. 28 endif 29 swig -python raw_pylibcpupower.swg 30 31 # Will only clean the bindings folder; will no 32 clean: 33 rm -f raw_pylibcpupower.py raw_pylibcp
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.