4
# Makefile for Linux input utilities
6
# © 1998-2000 Vojtech Pavlik (sponsored by SuSE)
7
# © 2008-2011 Stephen Kitt <steve@sk2.org>
9
# This program is free software; you can redistribute it and/or modify
10
# it under the terms of the GNU General Public License as published by
11
# the Free Software Foundation; either version 2 of the License, or
12
# (at your option) any later version.
14
# This program is distributed in the hope that it will be useful,
15
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
# GNU General Public License for more details.
19
# You should have received a copy of the GNU General Public License
20
# along with this program; if not, write to the Free Software
21
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25
# Edit the options below to suit your needs
29
CFLAGS = -g -O2 -Wall -I../linux/include
31
PROGRAMS = inputattach jstest jscal fftest ffmvforce ffset \
32
ffcfstress jscal-restore jscal-store
40
$(RM) *.o *.swp $(PROGRAMS) *.orig *.rej map *~
42
ffcfstress: ffcfstress.c
43
$(CC) -O2 -funsigned-char ffcfstress.c -lm -o ffcfstress
45
ffmvforce.o: ffmvforce.c
46
$(CC) -c $(CFLAGS) $(CPPFLAGS) $^ -o $@ `sdl-config --cflags`
48
ffmvforce: ffmvforce.o
49
$(CC) $^ -o $@ $(LDFLAGS) -g -lm `sdl-config --libs`
51
axbtnmap.o: axbtnmap.c axbtnmap.h
53
jscal.o: jscal.c axbtnmap.h
55
jscal: jscal.o axbtnmap.o
56
$(CC) $(CFLAGS) $(CPPFLAGS) $^ -lm -o $@
58
jstest.o: jstest.c axbtnmap.h
60
jstest: jstest.o axbtnmap.o
62
gencodes: gencodes.c scancodes.h
63
$(CC) $(CFLAGS) $(CPPFLAGS) gencodes.c -o gencodes
65
jscal-restore: jscal-restore.in
66
sed "s^@@PREFIX@@^$(PREFIX)^g" < $^ > $@
68
jscal-store: jscal-store.in
69
sed "s^@@PREFIX@@^$(PREFIX)^g" < $^ > $@
72
install -d $(DESTDIR)$(PREFIX)/bin
73
install $(PROGRAMS) $(DESTDIR)$(PREFIX)/bin
74
install -d $(DESTDIR)$(PREFIX)/share/joystick
75
install extract filter ident $(DESTDIR)$(PREFIX)/share/joystick
77
.PHONY: compile clean distclean install