forked from zestyping/openpixelcontrol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (29 loc) · 901 Bytes
/
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
platform=$(shell uname)
ifeq ($(platform),Darwin)
ALL=bin/dummy_client bin/dummy_server bin/gl_server
GL_OPTS=-framework OpenGL -framework GLUT
else ifeq ($(platform),Linux)
ALL=bin/dummy_client bin/dummy_server bin/tcl_server bin/ws2801_server bin/lpd8806_server bin/gl_server
GL_OPTS=-lGL -lglut -lGLU
endif
all: $(ALL)
clean:
rm -rf bin/*
bin/dummy_client: src/dummy_client.c src/opc_client.c
mkdir -p bin
gcc -o $@ $^
bin/dummy_server: src/dummy_server.c src/opc_server.c
mkdir -p bin
gcc -o $@ $^
bin/tcl_server: src/tcl_server.c src/opc_server.c src/spi.c
mkdir -p bin
gcc -o $@ $^
bin/ws2801_server: src/ws2801_server.c src/opc_server.c src/spi.c
mkdir -p bin
gcc -o $@ $^
bin/lpd8806_server: src/lpd8806_server.c src/opc_server.c src/spi.c
mkdir -p bin
gcc -o $@ $^
bin/gl_server: src/gl_server.c src/opc_server.c src/cJSON.c
mkdir -p bin
gcc $(GL_OPTS) -o $@ $^