From 87a70d198b1361b6c9601e61fef6b58071bbd0a8 Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Thu, 9 Nov 2023 02:17:39 +0100 Subject: add interactivity and shared lib --- Makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 43348e3..3a83189 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,4 @@ +PREFIX=/usr CC=gcc LDFLAGS=-lGL -lglut -lGLU -lm CFLAGS= @@ -9,13 +10,21 @@ default_target: all .c.o: ${CC} ${CFLAGS} -c $< -example: example.c +example: example.c ${OBJ} ${CC} -o $@ ${LDFLAGS} example.c ${OBJ} all: ${OBJ} example clean: - -rm *.o example + -rm *.o example libgragl.so run: all ./example + +libgragl.so: ${OBJ} + gcc -shared ${OBJ} -o $@ + +install: libgragl.so + install libgragl.so ${PREFIX}/lib/ + install gragl.h ${PREFIX}/include/ + install gragl.pc ${PREFIX}/share/pkgconfig/ -- cgit v1.2.3-70-g09d2