summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2010-06-16 02:27:32 +0200
committerHenrik Rydberg <rydberg@euromail.se>2010-06-16 02:27:32 +0200
commitff88de5cd38b5b51bad0e63d373d66745f1f8d31 (patch)
tree3fbf4adc8c807bc79a8272c4df1623c3677a9b2f /Makefile
parentad6faf6c53bc1924986e1cc10bb42e5d157cba8f (diff)
refactor: Move files
Move all headers into include, separate source files into modules match, mtdev, src and driver, move some common definitions to common.h, and include define support for the MT slot protocol. This patch does not introduce any logical changes. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile43
1 files changed, 20 insertions, 23 deletions
diff --git a/Makefile b/Makefile
index 294e034..f364845 100644
--- a/Makefile
+++ b/Makefile
@@ -1,40 +1,42 @@
VERSION = 1
PATCHLEVEL = 0
-EXTRAVERSION = alpha2
+EXTRAVERSION = alpha3
LIBRARY = multitouch.so
FDIS = 11-multitouch.fdi
-MODULES = match src
+MODULES = match mtdev src
+XMODULES = driver
o_match = match
-o_src = capabilities \
- iobuffer \
- hwdata \
- hwstate \
- mtstate \
- memory \
- mtouch \
- gestures \
- multitouch
+o_mtdev = iobuf caps hwdata
-TARGETS = $(addsuffix /test,$(MODULES))
+o_src = hwstate mtstate memory mtouch gestures
+
+o_driver= multitouch
+
+TARGETS += match/test
+TARGETS += src/test
OBJECTS = $(addsuffix .o,\
$(foreach mod,$(MODULES),\
$(addprefix $(mod)/,$(o_$(mod)))))
+XOBJECTS= $(addsuffix .o,\
+ $(foreach mod,$(XMODULES),\
+ $(addprefix $(mod)/,$(o_$(mod)))))
TBIN = $(addprefix bin/,$(TARGETS))
TLIB = $(addprefix obj/,$(LIBRARY))
TOBJ = $(addprefix obj/,$(addsuffix .o,$(TARGETS)))
TFDI = $(addprefix fdi/,$(FDIS))
OBJS = $(addprefix obj/,$(OBJECTS))
-LIBS = -lX11 -lpixman-1
+XOBJS = $(addprefix obj/,$(XOBJECTS))
+LIBS = -lm
DLIB = usr/lib/xorg/modules/input
DFDI = usr/share/hal/fdi/policy/20thirdparty
-INCLUDE = -I. -I/usr/include/xorg -I/usr/include/pixman-1
+INCLUDE = -Iinclude -I/usr/include/xorg -I/usr/include/pixman-1
OPTS = -O3 -fPIC
.PHONY: all clean
@@ -42,13 +44,13 @@ OPTS = -O3 -fPIC
all: $(OBJS) $(TLIB) $(TOBJ) $(TBIN)
-bin/%: obj/%.o
+bin/%: obj/%.o $(OBJS)
@mkdir -p $(@D)
- gcc $< -o $@
+ gcc $< -o $@ $(OBJS) $(LIBS)
-$(TLIB): $(OBJS)
+$(TLIB): $(OBJS) $(XOBJS)
@rm -f $(TLIB)
- gcc -shared $(OBJS) -Wl,-soname -Wl,$(LIBRARY) -o $@
+ gcc -shared $(OBJS) $(XOBJS) -Wl,-soname -Wl,$(LIBRARY) -o $@
obj/%.o: %.c
@mkdir -p $(@D)
@@ -69,8 +71,3 @@ install: $(TLIB) $(TFDI)
install -d "$(DESTDIR)/$(DFDI)"
install -m 755 $(TLIB) "$(DESTDIR)/$(DLIB)"
install -m 644 $(TFDI) "$(DESTDIR)/$(DFDI)"
-
-test:
- gcc $< $(OBJS) -o LINKTEST
-
-obj/match/test.o: match/match.c