1#
2# avrdude - A Downloader/Uploader for AVR device programmers
3# Copyright (C) 2003, 2004  Theodore A. Roth  <troth@openavr.org>
4#
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program. If not, see <http://www.gnu.org/licenses/>.
17#
18
19#
20# $Id: Makefile.am 1357 2015-10-30 23:11:22Z joerg_wunsch $
21#
22
23EXTRA_DIST   = \
24	ChangeLog \
25	ChangeLog-2001 \
26	ChangeLog-2002 \
27	ChangeLog-2003 \
28	ChangeLog-2004-2006 \
29	ChangeLog-2007 \
30	ChangeLog-2008 \
31	ChangeLog-2009 \
32	ChangeLog-2010 \
33	ChangeLog-2011 \
34	ChangeLog-2012 \
35	ChangeLog-2013 \
36	avrdude.1 \
37	avrdude.spec \
38	bootstrap
39
40CLEANFILES = \
41	config_gram.c \
42	config_gram.h \
43	lexer.c
44
45BUILT_SOURCES = $(CLEANFILES)
46
47#SUBDIRS      = doc @WINDOWS_DIRS@
48#DIST_SUBDIRS = doc windows
49
50# . lets build this directory before the following in SUBDIRS
51SUBDIRS = .
52# doc comes here, and we want to use the built avrdude to generate the parts list
53SUBDIRS += @SUBDIRS_AC@
54SUBDIRS += @WINDOWS_DIRS@
55DIST_SUBDIRS = @DIST_SUBDIRS_AC@
56
57AM_YFLAGS    = -d
58
59avrdude_CPPFLAGS = -DCONFIG_DIR=\"$(sysconfdir)\"
60
61libavrdude_a_CPPFLAGS = -DCONFIG_DIR=\"$(sysconfdir)\"
62libavrdude_la_CPPFLAGS = $(libavrdude_a_CPPFLAGS)
63
64avrdude_CFLAGS   = @ENABLE_WARNINGS@
65
66libavrdude_a_CFLAGS   = @ENABLE_WARNINGS@
67libavrdude_la_CFLAGS  = $(libavrdude_a_CFLAGS)
68
69avrdude_LDADD  = $(top_builddir)/$(noinst_LIBRARIES) @LIBUSB_1_0@ @LIBUSB@ @LIBFTDI1@ @LIBFTDI@ @LIBHID@ @LIBELF@ @LIBPTHREAD@ -lm
70
71bin_PROGRAMS = avrdude
72
73noinst_LIBRARIES = libavrdude.a
74lib_LTLIBRARIES = libavrdude.la
75
76# automake thinks these generated files should be in the distribution,
77# but this might cause trouble for some users, so we rather don't want
78# to have them there.
79#
80# See
81#
82# https://savannah.nongnu.org/bugs/index.php?func=detailitem&item_id=15536
83#
84# for why we don't want to have them.
85dist-hook:
86	rm -f \
87	$(distdir)/lexer.c \
88	$(distdir)/config_gram.c \
89	$(distdir)/config_gram.h
90
91libavrdude_a_SOURCES = \
92	config_gram.y \
93	lexer.l \
94	arduino.h \
95	arduino.c \
96	avr.c \
97	avr910.c \
98	avr910.h \
99	avrdude.h \
100	avrftdi.c \
101	avrftdi.h \
102	avrftdi_private.h \
103	avrftdi_tpi.c \
104	avrftdi_tpi.h \
105	avrpart.c \
106	bitbang.c \
107	bitbang.h \
108	buspirate.c \
109	buspirate.h \
110	butterfly.c \
111	butterfly.h \
112	config.c \
113	config.h \
114	confwin.c \
115	crc16.c \
116	crc16.h \
117	dfu.c \
118	dfu.h \
119	fileio.c \
120	flip1.c \
121	flip1.h \
122	flip2.c \
123	flip2.h \
124	freebsd_ppi.h \
125	ft245r.c \
126	ft245r.h \
127	jtagmkI.c \
128	jtagmkI.h \
129	jtagmkI_private.h \
130	jtagmkII.c \
131	jtagmkII.h \
132	jtagmkII_private.h \
133	jtag3.c \
134	jtag3.h \
135	jtag3_private.h \
136	libavrdude.h \
137	linuxgpio.c \
138	linuxgpio.h \
139	linux_ppdev.h \
140	lists.c \
141	my_ddk_hidsdi.h \
142	par.c \
143	par.h \
144	pgm.c \
145	pgm_type.c \
146	pickit2.c \
147	pickit2.h \
148	pindefs.c \
149	ppi.c \
150	ppi.h \
151	ppiwin.c \
152	safemode.c \
153	serbb.h \
154	serbb_posix.c \
155	serbb_win32.c \
156	ser_avrdoper.c \
157	ser_posix.c \
158	ser_win32.c \
159	solaris_ecpp.h \
160	stk500.c \
161	stk500.h \
162	stk500_private.h \
163	stk500v2.c \
164	stk500v2.h \
165	stk500v2_private.h \
166	stk500generic.c \
167	stk500generic.h \
168	tpi.h \
169	usbasp.c \
170	usbasp.h \
171	usbdevs.h \
172	usb_libusb.c \
173	usbtiny.h \
174	usbtiny.c \
175	update.c \
176	wiring.h \
177	wiring.c
178libavrdude_la_SOURCES = $(libavrdude_a_SOURCES)
179libavrdude_la_LDFLAGS = -version-info 1:0
180
181include_HEADERS = libavrdude.h
182
183avrdude_SOURCES = \
184	main.c \
185	term.c \
186	term.h
187
188man_MANS = avrdude.1
189
190sysconf_DATA = avrdude.conf
191
192install-exec-local: backup-avrdude-conf
193
194distclean-local:
195	rm -f avrdude.conf
196
197# This will get run before the config file is installed.
198backup-avrdude-conf:
199	@echo "Backing up avrdude.conf in ${DESTDIR}${sysconfdir}"
200	@if test -e ${DESTDIR}${sysconfdir}/avrdude.conf; then \
201		cp -pR ${DESTDIR}${sysconfdir}/avrdude.conf \
202			${DESTDIR}${sysconfdir}/avrdude.conf.bak; \
203	fi
204
205ACLOCAL_AMFLAGS = -I m4
206