-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
34 lines (28 loc) · 1021 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
CC := gcc
CFL := -ggdb -fPIC -std=c++11 -Wno-deprecated
TOOLCHAIN :=
OUT_EXECUTABLE_NAME := zraw-parser
ARCH :=
INCS := -Iinclude -Isrc -Inana/include -Izraw-decoder/tinydngloader/examples/dngwriter
INCS += -Izraw-decoder/zraw-decoder-lib/include
LIBS := -lssl -lstdc++ -lm -L./lib -lnana -lpthread -lX11 -lXft -lfontconfig -lstdc++fs -lm -lzraw -lcrypto
SOURCE_FILES := src/main.cpp
BUILDDIR := build/
LIBDIR := lib/
all: check-and-reinit-submodules
$(MAKE) -C ./nana/build/makefile/
$(MAKE) -C ./zraw-decoder
@mkdir -p $(LIBDIR)
cp ./nana/build/bin/libnana.a $(LIBDIR)
cp ./zraw-decoder/zraw-decoder-lib/build/libzraw.a $(LIBDIR)
@mkdir -p $(BUILDDIR)
$(TOOLCHAIN)$(CC) $(CFL) $(ARCH) $(SOURCE_FILES) $(INCS) $(LIBS) -o $(BUILDDIR)$(OUT_EXECUTABLE_NAME)
cp ./res/* $(BUILDDIR)
check-and-reinit-submodules:
@if git submodule status | egrep -q '^[-]|^[+]' ; then \
echo "INFO: Need to reinitialize git submodules"; \
git submodule update --init; \
fi
clear:
rm -f *.o
rm -f $(OUT_EXECUTABLE_NAME)