-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
28 lines (18 loc) · 696 Bytes
/
makefile
File metadata and controls
28 lines (18 loc) · 696 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#Harkirat Soomal
# Makefile for Assignment 2
CC = clang
CFLAGS = -std=c99 -Wall -pedantic -fpic
LDFLAGS = -lm
all: libphylib.so _phylib.so
clean:
rm -rf *.o *.so *.pyc *.svg _phylib.so phylib_wrap.c phylib.py __pycache__ phylib.db
libphylib.so: phylib.o
$(CC) phylib.o -shared -o libphylib.so
phylib.o: phylib.c phylib.h
$(CC) $(CFLAGS) -c phylib.c -o phylib.o
_phylib.so: phylib_wrap.o libphylib.so
$(CC) phylib_wrap.o -shared -o _phylib.so -L. -L/usr/lib/python3.11 -lphylib -lpython3.11
phylib_wrap.o: phylib_wrap.c phylib.h
$(CC) $(CFLAGS) -c phylib_wrap.c -o phylib_wrap.o -I/usr/include/python3.11/
phylib_wrap.c phylib.py: phylib.h
swig -python -o phylib_wrap.c phylib.i