aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 11 insertions, 2 deletions
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/