20 lines
300 B
Makefile
20 lines
300 B
Makefile
|
# 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
|