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