added a Makefile to use it as a C library. no python dependencies. added 2 example...
[rofl0r-libxauto.git] / src / Makefile.in
blobdd4e9fb9db08266a99c3576b083f19bd318dbaad
1 # @configure_input@
3 # $URL$
4 # $Author$
5 # $Date$
6 # $Rev$
8 srcdir = @srcdir@
9 VPATH = @srcdir@
10 package = @PACKAGE_NAME@
11 version = @PACKAGE_VERSION@
14 CC = @CC@
15 CFLAGS = -Wall
16 LIBFLAGS = -c
17 DBGFLAGS = -g
19 LOCAL_PYTHON_VERSION = @LOCAL_PYTHON_VERSION@
22 #User should not be here, but I don't want this to fail
23 user_error:
24 @echo "*** Running the default package in the parent directory ***"
25 @echo
26 @$(MAKE) -C ..
28 cleanup:
29 @-rm -f *.o
31 #Compile the source code - DO NOT COMPILE "main.c" - that is a separate test executable
32 build:
33 swig -python xautpy.i
34 rm xautpy.py
35 $(CC) $(CFLAGS) $(LIBFLAGS) \
36 $(srcdir)/xaut.c $(srcdir)/xaut_display.c $(srcdir)/xaut_keyboard.c \
37 $(srcdir)/xaut_mouse.c $(srcdir)/xaut_window.c $(srcdir)/xautpy_wrap.c \
38 -I/usr/include/python$(LOCAL_PYTHON_VERSION)/ -I/usr/include/X11/ \
39 -DHAVE_CONFIG_H -DEN_US -DLESS_THAN_FIX
41 build_test:
42 $(CC) $(CFLAGS) $(DBGFLAGS) \
43 $(srcdir)/xaut.c $(srcdir)/xaut_display.c $(srcdir)/xaut_keyboard.c \
44 $(srcdir)/xaut_mouse.c $(srcdir)/xaut_window.c $(srcdir)/main.c \
45 -I/usr/include/python$(LOCAL_PYTHON_VERSION)/ -I/usr/include/X11/ \
46 -lX11 -lXtst \
47 -DHAVE_CONFIG_H -DEN_US -DLESS_THAN_FIX \
48 -o $(package)_test
51 #Link the shared library for the Python module
52 link:
53 ld -shared $(srcdir)/xaut.o $(srcdir)/xaut_display.o \
54 $(srcdir)/xaut_keyboard.o $(srcdir)/xaut_mouse.o $(srcdir)/xaut_window.o \
55 $(srcdir)/xautpy_wrap.o \
56 /usr/lib/libX11.so /usr/lib/libXtst.so -o _$(package)py.so