update Makefile and remove strops

This commit is contained in:
2025-09-18 23:05:04 +02:00
parent c3d7bdfdf4
commit d19b454a70
2 changed files with 7 additions and 10 deletions

View File

@@ -1,19 +1,17 @@
.POSIX:
hdb-debug:
gcc -ansi -ggdb -o build/hdb-debug src/main.c src/db.c -lsqlite3
hdb:
gcc -ansi -O2 -pipe -o build/hdb src/main.c src/db.c -lsqlite3
hdb: src/db.c src/hdb.c
gcc -ansi -O2 -pipe -o build/hdb src/hdb.c src/db.c -lsqlite3
strip build/hdb
hdbd: src/db.c src/hdbd.c
gcc -ansi -o build/hdbd src/hdbd.c src/db.c -lsqlite3 -lstrops
gcc -ansi -O2 -pipe -o build/hdbd src/hdbd.c src/db.c -lsqlite3
strip build/hdbd
.PHONY: install uninstall
install: hdb
sudo mv build/hdb /usr/local/bin
install: hdb hdbd
sudo mv build/hdb build/hdbd /usr/local/bin
uninstall:
sudo rm /usr/local/bin/hdb
sudo rm /usr/local/bin/hdb /usr/local/bin/hdbd

View File

@@ -1,6 +1,5 @@
#define _POSIX_C_SOURCE 200809L /* needed for strndup */
#include <strops.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>