File: Makefile.in

package info (click to toggle)
gvidm 0.8-13
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 416 kB
  • sloc: cpp: 1,049; sh: 153; python: 104; makefile: 65
file content (81 lines) | stat: -rw-r--r-- 1,906 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
CXX = @CXX@
CXXFLAGS = @CXXFLAGS@ @CPPFLAGS@ @DEFS@ @GTK_CFLAGS@
LFLAGS = @LDFLAGS@ @LIBS@ @GTK_LIBS@
TARGET = gvidm
TESTTARGET = testrunner

srcdir=@srcdir@
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
mandir=@mandir@
install=@INSTALL@
install_data=${install} -m 0644
install_bin=${install} -m 0755
install_dir=${install} -d

DESTDIR=

TARGET_DIRS=$(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1

SRC = gvid.cc parse.cc vidmode.cc vidmode_parse.cc xvidmode.cc xrandr.cc
TESTSRC = test/parse_test.h test/vidmode_parse_test.h
TESTTMPSRC = $(TESTTARGET).tmp.cc

OBJS = $(SRC:.cc=.o)
TESTOBJS = $(TESTTMPSRC:.cc=.o) parse.o vidmode_parse.o

all: $(TARGET)

-include *.d

$(TARGET) : $(OBJS)
	$(CXX) -o $(TARGET) $(OBJS) $(LFLAGS)

$(TARGET_DIRS):
	$(install_dir) $@
	
install : $(TARGET_DIRS)
	$(install_bin) $(TARGET) $(DESTDIR)$(bindir)
	$(install_data) gvidm.1 $(DESTDIR)$(mandir)/man1

uninstall :
	rm -f $(DESTDIR)$(bindir)/$(TARGET)
	rm -f $(DESTDIR)$(mandir)/man1/gvidm.1

test: $(TESTTARGET)
	./$(TESTTARGET)
$(TESTTARGET): $(TESTOBJS)
	$(CXX) -o $@ $(TESTOBJS)
$(TESTTMPSRC): $(TESTSRC)
	cxxtestgen.py -o $@ --error-printer --abort-on-fail --have-eh $^


${srcdir}/configure: configure.in #aclocal.m4
	cd ${srcdir} && autoconf

# autoheader might not change config.h.in, so touch a stamp file.
${srcdir}/config.h.in: stamp-h.in
${srcdir}/stamp-h.in: configure.in #aclocal.m4
	cd ${srcdir} && autoheader
	echo timestamp > ${srcdir}/stamp-h.in

${srcdir}/config.h: stamp-h
${srcdir}/stamp-h: config.h.in stamp-h.in config.status
	./config.status

Makefile: Makefile.in config.status
	./config.status

config.status: configure
	./config.status --recheck


clean :
	rm -f *.o *.d $(TARGET) $(TESTTARGET) $(TESTTMPSRC)

distclean : clean
	rm -f config.status config.h config.cache config.log Makefile stamp-h *~ .*~ tags .cvsignore .#*
	rm -rf CVS autom4te.cache
	rm -f test/*~
	rm -rf test/CVS