Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

FreeBSD compatibility. #57

Closed
wants to merge 1 commit into from

2 participants

@dsets

/usr/local is not searched by default.
`install' does not come with a -D option.

@muennich
Owner

I did not merge this pull request directly, but incorporated other changes with commit b605b98, that should make sxiv compile on FreeBSD without any problems. Thanks for reporting.

@muennich muennich closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 7, 2012
  1. @dsets

    FreeBSD compatibility.

    dsets authored
This page is out of date. Refresh to see the latest.
Showing with 10 additions and 8 deletions.
  1. +10 −8 Makefile
View
18 Makefile
@@ -1,9 +1,10 @@
VERSION = git-20120506
-CC = gcc
-CFLAGS = -ansi -Wall -pedantic -O2
-LDFLAGS =
-LIBS = -lX11 -lImlib2 -lgif
+CC = gcc
+CFLAGS = -ansi -Wall -pedantic -O2
+LDFLAGS = -L/usr/local/lib
+INCLUDEDIRS = -I/usr/local/include
+LIBS = -lX11 -lImlib2 -lgif
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man
@@ -22,7 +23,7 @@ options:
.c.o:
@echo "CC $<"
- @$(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" -c -o $@ $<
+ @$(CC) $(INCLUDEDIRS) $(CFLAGS) -DVERSION=\"$(VERSION)\" -c -o $@ $<
$(OBJ): Makefile config.h
@@ -32,7 +33,7 @@ config.h:
sxiv: $(OBJ)
@echo "CC -o $@"
- @$(CC) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
+ @$(CC) $(INCLUDEDIRS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
clean:
@echo "cleaning"
@@ -40,7 +41,8 @@ clean:
install: all
@echo "installing executable file to $(DESTDIR)$(PREFIX)/bin"
- @install -D -m 755 sxiv $(DESTDIR)$(PREFIX)/bin/sxiv
+ @mkdir -p $(DESTDIR)$(PREFIX)/bin
+ @install -m 755 sxiv $(DESTDIR)$(PREFIX)/bin/sxiv
@echo "installing manual page to $(DESTDIR)$(MANPREFIX)/man1"
@mkdir -p $(DESTDIR)$(MANPREFIX)/man1
@sed "s/VERSION/$(VERSION)/g" sxiv.1 > $(DESTDIR)$(MANPREFIX)/man1/sxiv.1
@@ -50,4 +52,4 @@ uninstall:
@echo "removing executable file from $(DESTDIR)$(PREFIX)/bin"
@rm -f $(DESTDIR)$(PREFIX)/bin/sxiv
@echo "removing manual page from $(DESTDIR)$(MANPREFIX)/man1"
- @rm -f $(DESTDIR)$(MANPREFIX)/man1/sxiv.1
+ @rm -f $(DESTDIR)$(MANPREFIX)/man1/sxiv.1
Something went wrong with that request. Please try again.