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.

37 lines
836 B

10 years ago
CFLAGS=-Wall -Wextra -O2 -g -std=c99 -pedantic -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security
CPPFLAGS=-D_FORTIFY_SOURCE=2
SONAME=libimgdup.so.2
LDFLAGS=-Wl,-soname,$(SONAME) -fPIC
11 years ago
all: libs utils imdb_1to2
11 years ago
%.o: %.c
10 years ago
gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -c $<
11 years ago
libimgdup.so: database.o bitmap.o
gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -o $(SONAME) $^
ln -sf $(SONAME) libimgdup.so
libimgdup.a: database.o bitmap.o
10 years ago
ar rcs libimgdup.a $^
libs: libimgdup.so libimgdup.a
util: util.o libimgdup.so
gcc $(CFLAGS) $(CPPFLAGS) -L. $< -o $@ -limgdup
util-static: util.o libimgdup.a
gcc $(CFLAGS) $(CPPFLAGS) -L. $^ -o $@ -static
utils: util util-static
11 years ago
10 years ago
imdb_1to2: imdb_1to2.c
gcc $(CFLAGS) $(CPPFLAGS) -o $@ $^
10 years ago
11 years ago
clean:
rm -f *.o
10 years ago
rm -f imdb_?to?
rm -f util
10 years ago
rm -f util-static
rm -f libimgdup*