diff options
author | Paul Oliver <contact@pauloliver.dev> | 2024-02-29 01:50:44 +0100 |
---|---|---|
committer | Paul Oliver <contact@pauloliver.dev> | 2024-02-29 01:50:44 +0100 |
commit | ae15d7ba087f81d713280785840122dea81ea844 (patch) | |
tree | da9a41fe2b9037ba50fbee234b085fe6d34296d2 /Makefile | |
parent | 76a75c92be37aae5fb227030bb375a0a3e505637 (diff) |
Fixes for running on Linux.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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)
|