Sql init script

This commit is contained in:
Imbus 2024-02-14 17:33:24 +01:00
parent 3ad19d144a
commit 742a7f0bb1
2 changed files with 19 additions and 0 deletions

19
Makefile Normal file
View file

@ -0,0 +1,19 @@
# Define variables
DB_NAME := lab.db3
SQL_SCRIPT := database.sql
# Define targets and their dependencies
all: init_db
init_db: $(DB_NAME)
# Target to create the database
$(DB_NAME): $(SQL_SCRIPT)
sqlite3 $@ < $<
# Clean target
clean:
rm -f $(DB_NAME)
# Phony targets
.PHONY: all init_db clean

0
database.sql Normal file
View file