Add STATIC_UTILS option to Makefile
This commit is contained in:
parent
46a31b3fd9
commit
e4a7874cfb
2
Makefile
2
Makefile
|
@ -44,7 +44,7 @@ libgourou.so: libgourou.a
|
||||||
$(CXX) obj/*.o $(LDFLAGS) -o $@ -shared
|
$(CXX) obj/*.o $(LDFLAGS) -o $@ -shared
|
||||||
|
|
||||||
utils:
|
utils:
|
||||||
make -C utils ROOT=$(PWD) CXX=$(CXX) AR=$(AR) DEBUG=$(DEBUG)
|
make -C utils ROOT=$(PWD) CXX=$(CXX) AR=$(AR) DEBUG=$(DEBUG) STATIC_UTILS=$(STATIC_UTILS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf libgourou.a libgourou.so obj
|
rm -rf libgourou.a libgourou.so obj
|
||||||
|
|
|
@ -47,12 +47,14 @@ Compilation
|
||||||
|
|
||||||
Use _make_ command
|
Use _make_ command
|
||||||
|
|
||||||
make [CROSS=XXX] [DEBUG=1]
|
make [CROSS=XXX] [DEBUG=1] [STATIC_UTILS=1]
|
||||||
|
|
||||||
CROSS can define a cross compiler prefix (ie arm-linux-gnueabihf-)
|
CROSS can define a cross compiler prefix (ie arm-linux-gnueabihf-)
|
||||||
|
|
||||||
DEBUG can be set to compile in DEBUG mode
|
DEBUG can be set to compile in DEBUG mode
|
||||||
|
|
||||||
|
STATIC_UTILS to build utils with static library (libgourou.a) instead of default dynamic one (libgourou.so)
|
||||||
|
|
||||||
|
|
||||||
Utils
|
Utils
|
||||||
-----
|
-----
|
||||||
|
|
|
@ -2,7 +2,11 @@
|
||||||
TARGETS=acsmdownloader activate
|
TARGETS=acsmdownloader activate
|
||||||
|
|
||||||
CXXFLAGS=-Wall `pkg-config --cflags Qt5Core Qt5Network` -fPIC -I$(ROOT)/include -I$(ROOT)/lib/pugixml/src/
|
CXXFLAGS=-Wall `pkg-config --cflags Qt5Core Qt5Network` -fPIC -I$(ROOT)/include -I$(ROOT)/lib/pugixml/src/
|
||||||
|
ifneq ($(STATIC_UTILS),)
|
||||||
|
LDFLAGS=`pkg-config --libs Qt5Core Qt5Network` -L$(ROOT) $(ROOT)/libgourou.a -lcrypto -lzip
|
||||||
|
else
|
||||||
LDFLAGS=`pkg-config --libs Qt5Core Qt5Network` -L$(ROOT) -lgourou -lcrypto -lzip
|
LDFLAGS=`pkg-config --libs Qt5Core Qt5Network` -L$(ROOT) -lgourou -lcrypto -lzip
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(DEBUG),)
|
ifneq ($(DEBUG),)
|
||||||
CXXFLAGS += -ggdb -O0
|
CXXFLAGS += -ggdb -O0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user