Build simple static library to allow the building of test cases

This commit is contained in:
Ingo Ruhnke 2011-02-23 01:24:02 +01:00
parent 2f4557b024
commit da371f05e6
3 changed files with 38 additions and 11 deletions

View file

@ -102,10 +102,16 @@ env = conf.Finish()
env.DBusGlue("src/xboxdrv_daemon_glue.hpp", "src/xboxdrv_daemon.xml", DBUS_PREFIX="xboxdrv_daemon")
env.DBusGlue("src/xboxdrv_controller_glue.hpp", "src/xboxdrv_controller.xml", DBUS_PREFIX="xboxdrv_controller")
env.Program('xboxdrv',
Glob('src/*.cpp') +
Glob('src/axisfilter/*.cpp') +
Glob('src/buttonfilter/*.cpp') +
Glob('src/modifier/*.cpp'))
libxboxdrv = env.StaticLibrary('xboxdrv',
Glob('src/*.cpp') +
Glob('src/axisfilter/*.cpp') +
Glob('src/buttonfilter/*.cpp') +
Glob('src/modifier/*.cpp'))
env.Append(LIBS = libxboxdrv)
env.Program('xboxdrv', Glob('src/main/main.cpp'))
for file in Glob('test/*_test.cpp', strings=True):
env.Program(file[:-4], file)
# EOF #

27
src/main/main.cpp Normal file
View file

@ -0,0 +1,27 @@
/*
** Xbox360 USB Gamepad Userspace Driver
** Copyright (C) 2011 Ingo Ruhnke <grumbel@gmx.de>
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "xboxdrv.hpp"
int main(int argc, char** argv)
{
Xboxdrv xboxdrv;
return xboxdrv.main(argc, argv);
}
/* EOF */

View file

@ -795,10 +795,4 @@ Xboxdrv::main(int argc, char** argv)
return 0;
}
int main(int argc, char** argv)
{
Xboxdrv xboxdrv;
return xboxdrv.main(argc, argv);
}
/* EOF */