aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPaul Oliver <contact@pauloliver.dev>2024-02-29 01:50:44 +0100
committerPaul Oliver <contact@pauloliver.dev>2024-02-29 01:50:44 +0100
commitb11c47df5cf8d2832227bfac00cb48da522010f2 (patch)
tree2a3ffa9c482e8c2278298a2ce0f226379e094feb /Makefile
parentd7a72d72abf7831fc4b4885be71f340314e45388 (diff)
All executables now placed on ./bin/ directory.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 4 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 1e80311..230df19 100644
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,11 @@
-AR := ar
CC := gcc
-SLIB := lib/libsalis.a
-DLIB := lib/libsalis.so
+LIB := bin/libsalis.so
SOURCES := $(wildcard src/*.c)
OBJECTS := $(patsubst src/%.c,build/%.o,$(SOURCES))
DEPS := $(patsubst %.o,%.d,$(OBJECTS))
-SLFLAGS := rs
-DLFLAGS := -shared
+LFLAGS := -shared
# uncomment for debug
# OFLAGS := -ggdb
@@ -20,8 +17,7 @@ CFLAGS := -Iinclude -c $(OFLAGS) -MMD -Wall -Wextra -std=c89 -pedantic-errors \
-Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition
all: $(OBJECTS)
- $(AR) $(SLFLAGS) $(SLIB) $(OBJECTS)
- $(CC) $(DLFLAGS) -o $(DLIB) $(OBJECTS)
+ $(CC) $(LFLAGS) -o $(LIB) $(OBJECTS)
$(MAKE) -C tsalis
-include $(DEPS)
@@ -31,6 +27,5 @@ $(OBJECTS): $(patsubst build/%.o,src/%.c,$@)
clean:
-rm build/*
- -rm $(SLIB)
- -rm $(DLIB)
+ -rm $(LIB)
$(MAKE) clean -C tsalis