You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
CFLAGS=-Wall -Wextra -O0 -g -std=c99 -pedantic -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security
|
|
|
|
CPPFLAGS=-D_FORTIFY_SOURCE=2
|
|
|
|
LDFLAGS=-Wl,-soname,libimgdup.so.1 -fPIC
|
|
|
|
|
|
|
|
all: lib util
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
gcc $(CFLAGS) $(CPPFLAGS) -c $<
|
|
|
|
|
|
|
|
lib: database.o bitmap.o
|
|
|
|
gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -o libimgdup.so $^
|
|
|
|
ar rcs libimgdup.a $^
|
|
|
|
|
|
|
|
util: util.c
|
|
|
|
gcc $(CFLAGS) $(CPPFLAGS) -L. -limgdup $^ -o $@
|
|
|
|
gcc $(CFLAGS) $(CPPFLAGS) -L. -limgdup $^ -o $@-static -static
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.o
|
|
|
|
rm -f util
|
|
|
|
rm -f util-static
|
|
|
|
rm -f libimgdup*
|