-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (25 loc) · 1.2 KB
/
Makefile
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
28
29
30
31
32
33
34
35
36
37
38
39
## librpi2d Makefile
INCLUDES = -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
OBJECTS := src/glDebug.o src/pngread.o src/Texture2D.o src/rpi2d.o
SOURCES := src/glDebug src/pngread src/Texture2D src/rpi2d
CCC = g++
CC = gcc
all: $(SOURCES) librpi2d tests
tests: logo abcd
src/glDebug: src/glDebug.c src/glDebug.h
$(CC) $@.c -Wall -lGL $(INCLUDES) -c -o $@.o
src/pngread: src/pngread.c src/pngread.h
$(CC) $@.c -Wall -lGL $(INCLUDES) -c -o $@.o
src/Texture2D: src/Texture2D.cpp src/Texture2D.h
$(CCC) $@.cpp $(CFLAGS) -c $(INCLUDES) -o $@.o
src/rpi2d: src/rpi2d.cpp src/rpi2d.h
$(CCC) $@.cpp $(CFLAGS) -c $(INCLUDES) -o $@.o
librpi2d:
$(AR) rcs $@.so $(OBJECTS)
abcd:
$(CCC) examples/basic/$@.cpp $(CFLAGS) -Isrc -L/opt/vc/lib -L./ -lpng -lGLESv2 -lEGL -lrpi2d $(INCLUDES) -o examples/basic/$@
logo:
wget -q --continue "http://www.raspberrypi.org/wp-content/uploads/2011/10/Raspi-PGB001.png" -O examples/logo/rpilogo.png
$(CCC) examples/logo/$@.cpp $(CFLAGS) -Isrc -L/opt/vc/lib -L./ -lpng -lGLESv2 -lEGL -lrpi2d $(INCLUDES) -o examples/logo/$@
clean:
rm -f src/*.o librpi2d.so examples/basic/basic examples/logo/logo