add op_lidstate
[pandora-misc.git] / Makefile
1 CROSS_COMPILE ?= arm-none-linux-gnueabi-
2 CC = $(CROSS_COMPILE)gcc
3
4 CFLAGS += -Wall -Os
5 INSTALL ?= bin
6
7 BIN += op_runfbapp op_gammatool op_gammatable op_test_inputs op_lidstate
8 BIN += ofbset
9
10 all: $(BIN)
11
12 clean:
13         $(RM) *.o $(BIN)
14
15 op_runfbapp: LDLIBS += -lpthread -lX11
16 op_test_inputs: LDLIBS += -lpthread -lts
17 op_gammatable: LDLIBS += -lm
18
19 $(INSTALL):
20         mkdir -p $(INSTALL)
21
22 install: $(INSTALL) $(BIN)
23         cp op_runfbapp $(INSTALL)/
24         cp op_gammatool $(INSTALL)/op_gammatool_bin
25         cp op_gammatable $(INSTALL)/
26         cp op_test_inputs $(INSTALL)/op_test_inputs_bin
27         cp op_lidstate $(INSTALL)/
28         cp ofbset $(INSTALL)/
29         cp scripts/op_gammatool $(INSTALL)/
30         cp scripts/op_test_inputs $(INSTALL)/
31
32 vld:
33         $(CC) -Wall -O2 -DVALIDATION -s op_test_inputs.c -o op_test_inputs -Wl,-Bstatic -lpthread -lc -Wl,-Bdynamic -lts
34
35 .PHONY: all clean install vld