File: Makefile

package info (click to toggle)
python-fluids 1.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 13,108 kB
  • sloc: python: 59,520; f90: 481; lisp: 342; ansic: 337; cpp: 228; ruby: 145; haskell: 118; perl: 106; makefile: 59; javascript: 49
file content (15 lines) | stat: -rw-r--r-- 520 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
CC=gcc
PYTHON_VERSION=$(shell python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")
PYTHON_INCLUDES=$(shell python3-config --includes)
PYTHON_LDFLAGS=$(shell python3-config --ldflags)
PYTHON_LIBS=$(shell python3-config --libs)

# Add -lpython3.11 explicitly and move LDFLAGS to end of command
CFLAGS=-Wall -O3 $(PYTHON_INCLUDES)
LDFLAGS=$(PYTHON_LDFLAGS) $(PYTHON_LIBS) -lpython$(PYTHON_VERSION)

fluids_test: fluids_test.c
	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)

clean:
	rm -f fluids_test