Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 54 lines (41 sloc) 1.325 kB
b752d5c @muennich Added symbol BAR_SEPARATOR
authored
1 VERSION = git-20120215
e7bc3bb @muennich Non-working skeleton
authored
2
b96c106 @muennich Overhauled building
authored
3 CC = gcc
4383a65 @muennich Strictly adhere to ANSI-C standard
authored
4 CFLAGS = -ansi -Wall -pedantic -O2
03009f5 @muennich Made Makefile POSIX compliant
authored
5 LDFLAGS =
ef0ed32 @muennich Removed exif support; made gif support non-optional
authored
6 LIBS = -lX11 -lImlib2 -lgif
b96c106 @muennich Overhauled building
authored
7
8 PREFIX = /usr/local
9 MANPREFIX = $(PREFIX)/share/man
e7bc3bb @muennich Non-working skeleton
authored
10
691c6d7 @muennich Added own exif tag handling in files exif.[ch]
authored
11 SRC = commands.c exif.c image.c main.c options.c thumbs.c util.c window.c
03009f5 @muennich Made Makefile POSIX compliant
authored
12 OBJ = $(SRC:.c=.o)
e7bc3bb @muennich Non-working skeleton
authored
13
b96c106 @muennich Overhauled building
authored
14 all: options sxiv
e7bc3bb @muennich Non-working skeleton
authored
15
b96c106 @muennich Overhauled building
authored
16 options:
17 @echo "sxiv build options:"
18 @echo "CC = $(CC)"
19 @echo "CFLAGS = $(CFLAGS)"
20 @echo "LDFLAGS = $(LDFLAGS)"
21 @echo "PREFIX = $(PREFIX)"
0a171a9 @muennich Fixed dependency on Makefile & config.h
authored
22
23 .c.o:
b96c106 @muennich Overhauled building
authored
24 @echo "CC $<"
dad06c7 @muennich Much nicer handling of compile-time features
authored
25 @$(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" -c -o $@ $<
26
ef0ed32 @muennich Removed exif support; made gif support non-optional
authored
27 $(OBJ): Makefile config.h
b96c106 @muennich Overhauled building
authored
28
29 config.h:
30 @echo "creating $@ from config.def.h"
31 @cp config.def.h $@
32
ef0ed32 @muennich Removed exif support; made gif support non-optional
authored
33 sxiv: $(OBJ)
b96c106 @muennich Overhauled building
authored
34 @echo "CC -o $@"
ef0ed32 @muennich Removed exif support; made gif support non-optional
authored
35 @$(CC) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
e7bc3bb @muennich Non-working skeleton
authored
36
37 clean:
b96c106 @muennich Overhauled building
authored
38 @echo "cleaning"
ef0ed32 @muennich Removed exif support; made gif support non-optional
authored
39 @rm -f $(OBJ) sxiv sxiv-$(VERSION).tar.gz
b96c106 @muennich Overhauled building
authored
40
41 install: all
42 @echo "installing executable file to $(DESTDIR)$(PREFIX)/bin"
43 @install -D -m 755 sxiv $(DESTDIR)$(PREFIX)/bin/sxiv
44 @echo "installing manual page to $(DESTDIR)$(MANPREFIX)/man1"
45 @mkdir -p $(DESTDIR)$(MANPREFIX)/man1
46 @sed "s/VERSION/$(VERSION)/g" sxiv.1 > $(DESTDIR)$(MANPREFIX)/man1/sxiv.1
47 @chmod 644 $(DESTDIR)$(MANPREFIX)/man1/sxiv.1
48
49 uninstall:
50 @echo "removing executable file from $(DESTDIR)$(PREFIX)/bin"
51 @rm -f $(DESTDIR)$(PREFIX)/bin/sxiv
52 @echo "removing manual page from $(DESTDIR)$(MANPREFIX)/man1"
53 @rm -f $(DESTDIR)$(MANPREFIX)/man1/sxiv.1
Something went wrong with that request. Please try again.