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.
gentoo-overlay/sys-fs/mhddfs/files/mhddfs-respect-compiler-var...

68 lines
1.5 KiB

--- a/Makefile
+++ b/Makefile
@@ -22,13 +22,13 @@
TARGET = mhddfs
-CFLAGS = -Wall $(shell pkg-config fuse --cflags) \
- -DFUSE_USE_VERSION=26 -MMD
+CFLAGS += -Wall $(shell ${PKG_CONFIG} fuse glib-2.0 --cflags) \
+ -DFUSE_USE_VERSION=26 -MMD -rdynamic
ifdef WITHOUT_XATTR
CFLAGS += -DWITHOUT_XATTR
endif
-LDFLAGS = $(shell pkg-config fuse --libs)
+LIBS = $(shell pkg-config fuse glib-2.0 --libs)
FORTAR = src COPYING LICENSE README Makefile \
README.ru.UTF-8 ChangeLog mhddfs.1 \
@@ -64,14 +64,14 @@
$(shell rpm --eval '%_rpmdir')/*/mhddfs-*$(VERSION)-$(RELEASE)* .
$(TARGET): obj/obj-stamp $(OBJ)
- gcc $(CFLAGS) $(OBJ) -o $@ $(LDFLAGS)
+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) $(LIBS) -o $@
obj/obj-stamp:
mkdir -p obj
touch $@
obj/%.o: src/%.c
- gcc $(CFLAGS) -c $< -o $@
+ $(CC) $(CFLAGS) -c $< -o $@
clean:
rm -fr obj $(TARGET) pwrite_test statvfs rename
@@ -79,7 +79,7 @@
rm -fr rename-test/mnt
rename: tests/rename.c
- gcc -o $@ $<
+ $(CC) -o $@ $<
release_svn_thread:
@echo current version $(VERSION)
@@ -94,10 +94,10 @@
screen -t vim vim Makefile src/*.[ch] README* ChangeLog mhddfs.1
pwrite_test: src/test/pwrite.c
- gcc -o $@ $<
+ $(CC) -o $@ $<
statvfs: src/test/statvfs.c
- gcc -o $@ $<
+ $(CC) -o $@ $<
images-mount: test1.img test2.img
mount|grep -q `pwd`/test1 || sudo mount -o loop test1.img test1
@@ -141,7 +141,7 @@
while make test; do echo ok; echo; done
ptest:
- gcc -o $@ tests/plocks.c -l pthread
+ $(CC) -o $@ tests/plocks.c -l pthread
-./$@
rm -f $@