## ## Build daemon/ ## cd tests/ ## make -f Makefile.aes, output is binary t_crypt ## run: ./t_crypt CC = gcc CPPFLAGS = -I../daemon -I../lib OBJS_DIR = ../daemon/ OBJS = crypto.o log.o loglib.o LDFLAGS = $(shell pkg-config --libs glib-2.0) LDFLAGS += $(shell pkg-config --libs openssl) CFLAGS = -g $(shell pkg-config --cflags glib-2.0) -D_GNU_SOURCE %.d: %.c @set -e; rm -f $@; \ $(CC) -M $(CPPFLAGS) $(shell pkg-config --cflags glib-2.0) -D_GNU_SOURCE $< > $@.$$$$; \ sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \ rm -f $@.$$$$ all: t_crypt sources = t_crypt.c include $(sources:.c=.d) t_crypt: t_crypt.o gcc -o $@ $< $(addprefix $(OBJS_DIR), $(OBJS)) $(LDFLAGS) .PHONY: clean clean: -rm -f t_crypt t_crypt.o