add op_lidstate
[pandora-misc.git] / Makefile
index be54a6d..e2172f3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,19 +1,20 @@
 CROSS_COMPILE ?= arm-none-linux-gnueabi-
 CC = $(CROSS_COMPILE)gcc
 
-CFLAGS += -Wall -O2
-LDFLAGS += -s
+CFLAGS += -Wall -Os
 INSTALL ?= bin
 
-BIN = op_runfbapp op_gammatool op_test_inputs
+BIN += op_runfbapp op_gammatool op_gammatable op_test_inputs op_lidstate
+BIN += ofbset
 
 all: $(BIN)
 
 clean:
        $(RM) *.o $(BIN)
 
-op_runfbapp: LDFLAGS += -lpthread -lX11
-op_test_inputs: LDFLAGS += -lts
+op_runfbapp: LDLIBS += -lpthread -lX11
+op_test_inputs: LDLIBS += -lpthread -lts
+op_gammatable: LDLIBS += -lm
 
 $(INSTALL):
        mkdir -p $(INSTALL)
@@ -21,6 +22,14 @@ $(INSTALL):
 install: $(INSTALL) $(BIN)
        cp op_runfbapp $(INSTALL)/
        cp op_gammatool $(INSTALL)/op_gammatool_bin
+       cp op_gammatable $(INSTALL)/
        cp op_test_inputs $(INSTALL)/op_test_inputs_bin
+       cp op_lidstate $(INSTALL)/
+       cp ofbset $(INSTALL)/
        cp scripts/op_gammatool $(INSTALL)/
        cp scripts/op_test_inputs $(INSTALL)/
+
+vld:
+       $(CC) -Wall -O2 -DVALIDATION -s op_test_inputs.c -o op_test_inputs -Wl,-Bstatic -lpthread -lc -Wl,-Bdynamic -lts
+
+.PHONY: all clean install vld