diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..46f42f8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +CMakeLists.txt.user +CMakeCache.txt +CMakeFiles +CMakeScripts +Testing +Makefile +cmake_install.cmake +install_manifest.txt +compile_commands.json +CTestTestfile.cmake +_deps diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..43a69ef --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 2.8) +PROJECT(mdio-tool) + +include(GNUInstallDirs) + +set(SOURCES mdio-tool.c mii.h) +add_executable(mdio-tool ${SOURCES}) + +install(TARGETS mdio-tool RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/Makefile b/Makefile deleted file mode 100644 index e4e47cc..0000000 --- a/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -CROSS_COMPILE=arm-linux-gnueabihf - -all: - $(CROSS_COMPILE)-gcc mdio-tool.c -o mdio-tool -clean: - rm mdio-tool