From c907d10c6ab32e10a77260e79f96c88df01ca103 Mon Sep 17 00:00:00 2001 From: Samuel Sloniker Date: Wed, 18 Aug 2021 13:41:40 -0700 Subject: [PATCH] Build as shared library This is needed for Pythonification --- .gitignore | 3 ++- Makefile | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 0c2bdb4..8a50c65 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -worm +libworm.so +__pycache__ diff --git a/Makefile b/Makefile index 76dab52..a757d72 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,4 @@ -worm: worm.c - gcc -o worm worm.c -l curses +libworm.so: worm.c + gcc -c worm.c -l curses -fPIC + gcc -shared -o libworm.so worm.o -l curses + rm worm.o