1 # TinyPTC x11 v0.7.3 Makefile
2 # Copyright (C) 2000-2002 Alessandro Gatti <a.gatti@tiscali.it>
4 # http://www.sourceforge.net/projects/tinyptc/
6 # This library is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU Lesser General Public
8 # License as published by the Free Software Foundation; either
9 # version 2 of the License, or (at your option) any later version.
11 # This library is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # Lesser General Public License for more details.
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with this library; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 CFLAGS = -Wall -Wno-unknown-pragmas -Os
33 INCLUDES = -I/usr/X11R6/include -I/usr/local/include -I/usr/include
34 LIBS = -L/usr/X11R6/lib -L/usr/lib -L/usr/local/lib -lX11 -lXext \
35 -lXxf86dga -lXxf86vm -lXv
37 CTARGETS = xlib.c xdbe.c xshm.c convert.c xdga1.c xdga2.c xvshm.c
38 ASOURCES = mmx.s yv12.s
39 OTARGETS = $(CTARGETS:.c=.o)
40 COBJECTS = $(CSOURCES:.c=.o)
41 AOBJECTS = $(ASOURCES:.s=.o)
42 EXECUTABLE = tinyptc_test
43 LIBRARY = libtinyptc.a
45 # Feel free to change this.
48 $(EXECUTABLE): $(OTARGETS) $(COBJECTS) $(LIBRARY)
49 $(LD) $(LDFLAGS) $(OTARGETS) $(COBJECTS) $(AOBJECTS) $(LIBS) -o $(EXECUTABLE)
50 $(STRIP) --strip-all $(EXECUTABLE)
51 $(STRIP) --remove-section=".comment" $(EXECUTABLE)
52 $(STRIP) --remove-section=".note" $(EXECUTABLE)
54 $(LIBRARY): $(OTARGETS) $(AOBJECTS)
55 $(AR) cru $(LIBRARY) $(OTARGETS) $(AOBJECTS)
59 $(CC) $(CFLAGS) $(INCLUDES) -c $<
61 # Unfortunately makedepend doesn't work for assembly files...
64 $(CPP) $(INCLUDES) mmx.h | $(SH) buildmmx.sh > mmx.i
70 $(AS) $(AFLAGS) yv12.s
74 $(CPP) $(INCLUDES) tinyptc.h | $(SH) findused.sh
75 $(SWIG) -python tinyptc.h
76 $(CC) -c tinyptc_wrap.c -I/usr/include/python$(PYTHON_VERSION) \
77 -I/usr/local/include/python$(PYTHON_VERSION) $(INCLUDES)
78 $(CC) -shared $(LIBS) $(LIBRARY) convert.o ptctarget.o tinyptc_wrap.o \
82 $(RM) .depend 2> /dev/null
83 makedepend -f- -- $(INCLUDES) $(CFLAGS) $(CSOURCES) > .depend 2> /dev/null
86 $(RM) $(EXECUTABLE) $(LIBRARY) $(OTARGETS) $(COBJECTS) $(AOBJECTS)
87 $(RM) ptctarget.o .depend mmx.i tinyptc_wrap.[co] TinyPTC.py*