# Very basic makefile for compiling iguana in Linux with StaticNanoMsg
# derived from m_LP (used to compile iguana for linux)
# author: fadedreamz

SRCS=$(wildcard *.c)
SRCS+=$(wildcard jpeg/*.c)
SRCS+=$(wildcard jpeg/unix/*.c)

OBJS=$(SRCS:%.c=%.o)

INCLUDE_DIRS+=-I/usr/lib/x86_64-linux-gnu/curl 
PREPROCESSORS+=-DLIQUIDITY_PROVIDER=1 -DUSE_STATIC_NANOMSG

CFLAGS+=-O2 $(PREPROCESSORS) $(INCLUDE_DIRS)

update_repo:
	git pull

clean:
	-rm $(OBJS)

all: update_repo $(OBJS) static 
	@echo ' ================'
	@echo '| crypto777 [OK] |'
	@echo ' ================'

static: $(OBJS)
	ar rc ../agents/libcrypto777.a $(OBJS) 

.PHONY: update_repo clean all static