]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
Use glib2 flags set by configure. Rewrite a rule so it is more portable.
authorR.E. Wolff <R.E.Wolff@BitWizard.nl>
Tue, 12 Feb 2013 08:30:55 +0000 (09:30 +0100)
committerR.E. Wolff <R.E.Wolff@BitWizard.nl>
Tue, 12 Feb 2013 08:30:55 +0000 (09:30 +0100)
Makefile.am

index c6e2f9bd2bdd1b1fe419b35cf693b105eb08b737..4a767fa2e783010301821ee55dd8a192a3b34050 100644 (file)
@@ -20,19 +20,20 @@ mtr_SOURCES = mtr.c \
 nodist_mtr_SOURCES = version.h
 EXTRA_mtr_SOURCES = curses.c \
                     gtk.c
+DEFAULT_INCLUDES= $(GLIB_CFLAGS) -I.
 mtr_DEPENDENCIES = $(GTK_OBJ) $(CURSES_OBJ)
-mtr_LDFLAGS = $(GTK_OBJ) $(CURSES_OBJ)
+mtr_LDFLAGS = $(GTK_OBJ) $(CURSES_OBJ) $(GLIB_LIBS)
 
 CLEANFILES = version.h
 BUILT_SOURCES = version.h
 
 version.h: version.h.tmp Makefile $(mtr_SOURCES)
-       @cat $< > $@; \
+       @cat version.h.tmp > $@; \
        if [ -d .git ] && [ -n "$$(which git)" ]; then \
          xver="+git:$$(git rev-list -n1 --abbrev=8 --abbrev-commit HEAD)"; \
          sed \
            -e "/#define *MTR_VERSION */{s/\"\([^\"]*\)\"/\"\1$$xver\"/;}" \
-           $< > $@; \
+           version.h.tmp > $@; \
        fi;
 
 EXTRA_DIST = SECURITY mtr.8 Makefile Makefile.dist