Makefile: simplify kafel and protobuf-c-text building rules
authorRobert Swiecki <robert@swiecki.net>
Sun, 28 May 2017 22:29:52 +0000 (00:29 +0200)
committerRobert Swiecki <robert@swiecki.net>
Sun, 28 May 2017 22:29:52 +0000 (00:29 +0200)
Makefile

index 87a7b3d1e1dda1c96bf79aed0506ba0c8bb221f7..ab69552689aa224586b363ad4f994db2fb3fde35 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -62,12 +62,12 @@ endif
 endif
 
 
-.PHONY: all clear depend indent kafel protobuf-c-text
+.PHONY: all clear depend indent
 
 .c.o: %.c
        $(CC) $(CFLAGS) $< -o $@
 
-all: $(PROTO_DEPS) protobuf-c-text kafel $(BIN)
+all: $(PROTO_DEPS) $(BIN)
 ifneq ($(PROTOBUF_EXISTS), yes)
        $(info *********************************************************)
        $(info * Code compiled without libprotobuf-c/libprotobuf-c-dev *)
@@ -75,24 +75,20 @@ ifneq ($(PROTOBUF_EXISTS), yes)
        $(info *********************************************************)
 endif
 
-$(BIN): $(OBJS) $(LIBS)
+$(BIN): $(LIBS) $(OBJS)
        $(CC) -o $(BIN) $(OBJS) $(LIBS) $(LDFLAGS)
 
-kafel:
+kafel/libkafel.a:
 ifeq ("$(wildcard kafel/Makefile)","")
        git submodule update --init
 endif
+       $(MAKE) -C kafel
 
-protobuf-c-text:
+protobuf-c-text/protobuf-c-text/.libs/libprotobuf-c-text.a:
 ifeq ("$(wildcard protobuf-c-text/configure)","")
        git submodule update --init
-       sh -c "cd protobuf-c-text; CFLAGS=\"-fPIC $(EXTRA_CFLAGS)\" ./autogen.sh;"
+       sh -c "cd protobuf-c-text; CFLAGS=\"-fPIC $(EXTRA_CFLAGS)\" ./autogen.sh --enable-shared=no --disable-doxygen-doc;"
 endif
-
-kafel/libkafel.a:
-       $(MAKE) -C kafel
-
-protobuf-c-text/protobuf-c-text/.libs/libprotobuf-c-text.a:
        $(MAKE) -C protobuf-c-text
 
 $(PROTO_DEPS): config.proto