Switch to single makefile.

This commit is contained in:
Érico Rolim 2020-09-13 18:20:15 -03:00
parent b70d741b03
commit 71d813af3e
2 changed files with 10 additions and 10 deletions

View File

@ -1,5 +0,0 @@
baseencode.a: base32.o base64.o
$(AR) r $@ $^
clean:
rm -f baseencode.a base32.o base64.o

View File

@ -1,10 +1,14 @@
INC = -Iextern
CFLAGS = -O2 -g -pipe -Wall -Wextra $(INC)
OPT = -O2
WARN = -Wall -Wextra
CFLAGS = $(OPT) -g -pipe
LDLIBS = -lbearssl -lsbearssl -lskarnet
LDFLAGS = -Wl,--as-needed
BASEENCODE = extern/libbaseencode/baseencode.a
BASEENCODEOBJS = extern/libbaseencode/base64.o extern/libbaseencode/base32.o
LIBS = $(BASEENCODE)
LIBSOBJS = $(BASEENCODEOBJS)
FINAL = purr
OBJS = purr.o socket.o urls.o files.o comm.o formats.o encrypt.o
@ -18,12 +22,13 @@ check: $(TEST)
./tests
$(OBJS): purr.h
$(OBJS): CFLAGS += $(WARN) $(INC)
purr: $(OBJS) $(LIBS)
tests: $(TOBJS) $(LIBS)
$(BASEENCODE):
make -C extern/libbaseencode
$(BASEENCODEOBJS): extern/libbaseencode/common.h extern/libbaseencode/baseencode.h
$(BASEENCODE): $(BASEENCODEOBJS)
$(AR) r $@ $^
clean:
rm -f $(FINAL) $(OBJS) $(TEST) $(TOBJS)
make -C extern/libbaseencode clean
rm -f $(FINAL) $(OBJS) $(TEST) $(TOBJS) $(LIBS) $(LIBSOBJS)