Skip to content
Snippets Groups Projects
Commit f3358536 authored by Hugo Hörnquist's avatar Hugo Hörnquist
Browse files

Add 'all', 'clean', and 'install' rules.

parent 0210f261
No related branches found
No related tags found
No related merge requests found
.PHONY: all clean install
libs = sqlite3 uuid libs = sqlite3 uuid
CFLAGS = -Wall -pedantic -std=c2x -fPIC \ CFLAGS = -Wall -pedantic -std=c2x -fPIC \
-ggdb \ -ggdb \
...@@ -7,5 +9,17 @@ LDLIBS = $(shell pkg-config --libs $(libs)) ...@@ -7,5 +9,17 @@ LDLIBS = $(shell pkg-config --libs $(libs))
C_FILES = sqlite-uuid.c C_FILES = sqlite-uuid.c
O_FILES = $(C_FILES:%.c=%.o) O_FILES = $(C_FILES:%.c=%.o)
DESTDIR = /
PREFIX = /usr/local
all: sqlite-uuid.so
sqlite-uuid.so: $(O_FILES) sqlite-uuid.so: $(O_FILES)
$(CC) -shared -o $@ $^ $(LDLIBS) $(CC) -shared -o $@ $^ $(LDLIBS)
install: all
install -D -t $(DESTDIR)/$(PREFIX)/lib sqlite-uuid.so
clean:
-rm $(O_FILES)
-rm sqlite-uuid.so
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment