convert to SLOT-ed libbase
Also drop CFLAGS setting since it isn't used anywhere.
BUG=chromium-os:16623
TEST=`emerge-x86-alex gestures` still works
TEST=`cros_run_unit_tests --board x86-alex -p gestures` passes
Change-Id: I45bc27f829a1e4fabffaa806cddab4c5c4015c92
diff --git a/Makefile b/Makefile
index 034318c..09e6079 100644
--- a/Makefile
+++ b/Makefile
@@ -79,16 +79,6 @@
-DGESTURES_INTERNAL=1 \
-I..
-LINK_FLAGS=\
- -lbase \
- -lpthread \
- -lrt
-
-TEST_LINK_FLAGS=\
- -lgcov \
- -lglib-2.0 \
- -lgtest
-
KEYBOARD_TOUCHPAD_HELPER=keyboard_touchpad_helper
# Local compilation needs these flags, esp for code coverage testing
@@ -101,10 +91,27 @@
-fprofile-arcs
else
CXXFLAGS+=\
- -DXLOGGING \
- $(shell $(PKG_CONFIG) --cflags pixman-1)
+ -DXLOGGING
+PC_DEPS += pixman-1
endif
+PKG_CONFIG ?= pkg-config
+PC_DEPS += libchrome-85268
+PC_CFLAGS := $(shell $(PKG_CONFIG) --cflags $(PC_DEPS))
+PC_LIBS := $(shell $(PKG_CONFIG) --libs $(PC_DEPS))
+
+CXXFLAGS += $(PC_CFLAGS)
+LINK_FLAGS += $(PC_LIBS)
+
+LINK_FLAGS+=\
+ -lpthread \
+ -lrt
+
+TEST_LINK_FLAGS=\
+ -lgcov \
+ -lglib-2.0 \
+ -lgtest
+
all: $(SONAME)
$(MAKE) -C $(KEYBOARD_TOUCHPAD_HELPER)
diff --git a/keyboard_touchpad_helper/Makefile b/keyboard_touchpad_helper/Makefile
index 0b1d030..a6d2132 100644
--- a/keyboard_touchpad_helper/Makefile
+++ b/keyboard_touchpad_helper/Makefile
@@ -28,10 +28,15 @@
-DGESTURES_INTERNAL=1 \
-I..
-CFLAGS+=$(CXXFLAGS)
+PKG_CONFIG ?= pkg-config
+PC_DEPS = libchrome-85268
+PC_CFLAGS := $(shell $(PKG_CONFIG) --cflags $(PC_DEPS))
+PC_LIBS := $(shell $(PKG_CONFIG) --libs $(PC_DEPS))
+
+CXXFLAGS += $(PC_CFLAGS)
LINK_FLAGS=\
- -lbase \
+ $(PC_LIBS) \
-lgflags \
-lpthread \
-lrt \