summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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