diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 30 |
1 files changed, 27 insertions, 3 deletions
@@ -17,6 +17,8 @@ LIB_NAME = gamepad OBJ =\ + libgamepad_absolute_axis_names__.o\ + libgamepad_button_names__.o\ libgamepad_close_device.o\ libgamepad_close_superdevice.o\ libgamepad_construct_constant_force_feedback_effect.o\ @@ -32,12 +34,15 @@ OBJ =\ libgamepad_destroy_attachment_monitor.o\ libgamepad_disable_force_feedback_autocenter.o\ libgamepad_find_sound_devices.o\ + libgamepad_get_absolute_axis_by_name.o\ libgamepad_get_absolute_axis_info.o\ libgamepad_get_absolute_axis_name.o\ libgamepad_get_attachment_event.o\ + libgamepad_get_button_by_name.o\ libgamepad_get_button_is_pressed.o\ libgamepad_get_button_name.o\ libgamepad_get_force_feedback_max_concurrency.o\ + libgamepad_get_relative_axis_by_name.o\ libgamepad_get_relative_axis_name.o\ libgamepad_grab.o\ libgamepad_install_force_feedback_effect.o\ @@ -47,6 +52,7 @@ OBJ =\ libgamepad_open_device.o\ libgamepad_open_superdevice.o\ libgamepad_play_force_feedback_effect.o\ + libgamepad_relative_axis_names__.o\ libgamepad_set_clock.o\ libgamepad_set_force_feedback_autocenter.o\ libgamepad_set_force_feedback_master_gain.o\ @@ -57,7 +63,10 @@ OBJ =\ HDR =\ common.h\ - libgamepad.h + libgamepad.h\ + button.count\ + absolute-axis.count\ + relative-axis.count TESTS =\ test-attachments\ @@ -74,6 +83,21 @@ $(OBJ): $(HDR) $(LOBJ): $(HDR) $(TESTS:=.o): $(HDR) $(TESTS): libgamepad.a +libgamepad_button_names__.o: button.names +libgamepad_absolute_axis_names__.o: absolute-axis.names +libgamepad_relative_axis_names__.o: relative-axis.names + +button.names: names.sh + printf '%s\n' '#include <linux/input.h>' | $(CPP) -dM | ./names.sh BTN KEY > $@ + +absolute-axis.names: names.sh + printf '%s\n' '#include <linux/input.h>' | $(CPP) -dM | ./names.sh ABS > $@ + +relative-axis.names: names.sh + printf '%s\n' '#include <linux/input.h>' | $(CPP) -dM | ./names.sh REL > $@ + +.names.count: + wc -l < $< > $@ .c.o: $(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS) $(LIBS_CFLAGS) @@ -110,10 +134,10 @@ uninstall: -rm -f -- "$(DESTDIR)$(PREFIX)/include/libgamepad.h" clean: - -rm -f -- *.o *.a *.lo *.su *.so *.so.* *.dll *.dylib + -rm -f -- *.o *.a *.lo *.su *.so *.so.* *.dll *.dylib *.names *.count -rm -f -- *.gch *.gcov *.gcno *.gcda *.$(LIBEXT) $(TESTS) .SUFFIXES: -.SUFFIXES: .lo .o .c +.SUFFIXES: .lo .o .c .names .count .PHONY: all install uninstall clean |