From 429f9aced82cbe3448340f3237808eeb3a9254ec Mon Sep 17 00:00:00 2001 From: Glenn Date: Wed, 27 Dec 2023 10:23:44 +0100 Subject: [PATCH] chore: merge run.sh and build.sh as makefile --- Makefile | 24 ++++++++++++++++++++++++ build.sh | 5 ----- run.sh | 3 --- 3 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 Makefile delete mode 100755 build.sh delete mode 100755 run.sh diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c0ba329 --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ + +BUILD_DIR=_build + +all: build + +$(BUILD_DIR): + mkdir -p $(BUILD_DIR) + cmake -S . -B _build -D CMAKE_BUILD_TYPE=Debug + +build: | $(BUILD_DIR) + cmake --build _build + +debug: | $(BUILD_DIR) + gdb _build/igmpgen + +run: | $(BUILD_DIR) + _build/igmpgen + +install: | $(BUILD_DIR) + cmake --install _build + +package: | $(BUILD_DIR) + make -C _build package + diff --git a/build.sh b/build.sh deleted file mode 100755 index 99aa9d9..0000000 --- a/build.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -mkdir -p _build -cmake -S . -B _build -D CMAKE_BUILD_TYPE=Debug -cmake --build _build diff --git a/run.sh b/run.sh deleted file mode 100755 index 74d24eb..0000000 --- a/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -gdb _build/igmpgen