chore: merge run.sh and build.sh as makefile
This commit is contained in:
parent
61a4872d88
commit
429f9aced8
3 changed files with 24 additions and 8 deletions
24
Makefile
Normal file
24
Makefile
Normal file
|
@ -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
|
||||||
|
|
5
build.sh
5
build.sh
|
@ -1,5 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
mkdir -p _build
|
|
||||||
cmake -S . -B _build -D CMAKE_BUILD_TYPE=Debug
|
|
||||||
cmake --build _build
|
|
3
run.sh
3
run.sh
|
@ -1,3 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
gdb _build/igmpgen
|
|
Loading…
Reference in a new issue