aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 230df19..6b4b6e1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
CC := gcc
LIB := bin/libsalis.so
+ULIB := /usr/lib/libsalis.so
SOURCES := $(wildcard src/*.c)
OBJECTS := $(patsubst src/%.c,build/%.o,$(SOURCES))
@@ -13,8 +14,9 @@ LFLAGS := -shared
# uncomment for release
OFLAGS := -O3 -DNDEBUG
-CFLAGS := -Iinclude -c $(OFLAGS) -MMD -Wall -Wextra -std=c89 -pedantic-errors \
- -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition
+CFLAGS := -Iinclude -c $(OFLAGS) -MMD -Wall -Wextra -std=c89 -fPIC \
+ -pedantic-errors -Wmissing-prototypes -Wstrict-prototypes \
+ -Wold-style-definition
all: $(OBJECTS)
$(CC) $(LFLAGS) -o $(LIB) $(OBJECTS)
@@ -29,3 +31,6 @@ clean:
-rm build/*
-rm $(LIB)
$(MAKE) clean -C tsalis
+
+install:
+ cp $(LIB) $(ULIB)