aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-05-28 11:41:02 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-07-20 23:52:54 +0200
commit3f642351232e51963c980a46260ce59076588c55 (patch)
tree8ac59cd56a06b46f6e1805ea7b98a57fc9432156
parentf75ff13b31d546b4bceea07ce0008bf0fc5ecf71 (diff)
Makefile: Use dynstr's own Makefile
dynstr has been recently modified so as to allow building also from make(1).
-rw-r--r--Makefile12
1 files changed, 8 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 04a5abb..5e330be 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,8 @@ CFLAGS = $(O) $(CDEFS) -g -Wall -Idynstr/include -MD -MF $(@:.o=.d)
LIBS = -lcjson -lssl -lm -lcrypto
LDFLAGS = $(LIBS)
DEPS = $(OBJECTS:.o=.d)
+DYNSTR = dynstr/libdynstr.a
+DYNSTR_FLAGS = -Ldynstr -ldynstr
OBJECTS = \
auth.o \
base64.o \
@@ -18,15 +20,17 @@ OBJECTS = \
jwt.o \
main.o \
page.o \
- server.o \
- dynstr/dynstr.o
+ server.o
all: $(PROJECT)
clean:
rm -f $(OBJECTS) $(DEPS)
-$(PROJECT): $(OBJECTS)
- $(CC) $(OBJECTS) $(LDFLAGS) -o $@
+$(PROJECT): $(OBJECTS) $(DYNSTR)
+ $(CC) $(OBJECTS) $(LDFLAGS) $(DYNSTR_FLAGS) -o $@
+
+$(DYNSTR):
+ +cd dynstr && $(MAKE)
-include $(DEPS)