mirror of https://github.com/ericonr/purr-c.git
Switch to single makefile.
This commit is contained in:
parent
b70d741b03
commit
71d813af3e
|
@ -1,5 +0,0 @@
|
|||
baseencode.a: base32.o base64.o
|
||||
$(AR) r $@ $^
|
||||
|
||||
clean:
|
||||
rm -f baseencode.a base32.o base64.o
|
15
makefile
15
makefile
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue