Remove function SearchScreenGridSlop() and use SearchObjectByLocation() directly
[geda-pcb/pcjc2.git] / lib / Makefile.am
blobae1b485ea42fc2b99f5af6b0f4de2fb75b2f9d7d
1 ## -*- makefile -*-
2 ##
4 PCBLIBDIR=              @PCBLIBDIR@
5 LIBRARYFILENAME=        @LIBRARYFILENAME@
7 pcblibdir=              $(PCBLIBDIR)
8 pcblib_SCRIPTS= ${LIBSCRIPTS}
9 LIBSCRIPTS= \
10         CreateLibraryContents.sh \
11         CreateLibrary.sh \
12         ListLibraryContents.sh \
13         QueryLibrary.sh \
14         qfp-ui
16 dist_noinst_SCRIPTS= \
17         m4lib_to_newlib.sh
19 pcblib_DATA= ${LIBCONTENTS} ${DAT_FILES}
21 LIBCONTENTS= \
22         ${LIBRARYFILENAME} \
23         ${LIBRARYFILENAME}.contents
26 # ######################################################
28 # Process the entire m4lib library and create a newlib
29 # library from it.
32 NEWLIB=${LIBRARYFILENAME}-newlib
34 all-local: $(NEWLIB).stamp
36 # if we have compiled in PNG export capability then
37 # generate previews of all the footprints.  This has
38 # the added benefit of doing a PCB syntax check on all of them
39 if PNG_PREVIEW
40 PREVIEW=        --png
41 PREVIEW_MSG=    png-preview=yes
42 else
43 PREVIEW=        
44 PREVIEW_MSG=    png-preview=no
45 endif
47 if BUILD_PCBLIB_NEWLIB
48 NEWLIB_DEPS=    ${LIBCONTENTS} ${srcdir}/m4lib_to_newlib.sh
49 else
50 NEWLIB_DEPS=
51 endif
53 ${NEWLIB}.stamp : footprint.pcb ${NEWLIB_DEPS}
54         rm -fr ${NEWLIB}
55         ${SHELL} ${srcdir}/m4lib_to_newlib.sh --contents \
56                 ${LIBRARYFILENAME}.contents --output ${NEWLIB} \
57                 ${PREVIEW} --pcb "${PCB}" --awk "${AWK}"
58         echo '${PREVIEW_MSG}' > $@
60 # Remove any rebuilt footprints
61 if BUILD_PCBLIB_NEWLIB
62 distclean-local:
63         rm -fr ${NEWLIB}
64 endif
66 install-data-local: ${NEWLIB}.stamp
67         if test -d ${NEWLIB} ; then \
68                 tar cf - ${NEWLIB} | (cd $(DESTDIR)$(PCBLIBDIR) && tar -xf -) ; \
69         else  \
70                 cd $(srcdir) && tar -cf - ${NEWLIB} | (cd $(DESTDIR)$(PCBLIBDIR) && tar -xf -) ; \
71         fi
73 uninstall-local:
74         chmod -R a+w $(DESTDIR)$(PCBLIBDIR)/${NEWLIB}
75         rm -fr $(DESTDIR)$(PCBLIBDIR)/${NEWLIB}
77 EXTRA_DIST=     ${NEWLIB} footprint.pcb ${NEWLIB}.stamp png_diff.sh
79 if BUILD_PCBLIB_NEWLIB
80 DISTCLEANFILES= ${NEWLIB}.stamp
81 else
82 DISTCLEANFILES=
83 endif
87 # ######################################################
89 pcblibm4dir=    $(PCBLIBDIR)/m4
90 pcblibm4_DATA=  $(LIB_FILES)
92 ##pcblibm4_SCRIPTS=     update-pcb
93 ## XXX what was this about?
94 ##(cd $(pcblibm4dir) && sh ./update-pcb)
96 # note:  only some of the scripts listed in LIBSCRIPTS are generated by autoconf
97 # and hence need chmod-ing.  The others (ListLIbraryContents.sh in particular)
98 # is just one of the distribution files and thus will not exist in the build
99 # directory if the build is not done in the source directory
100 all-local:
101         for f in ${LIBSCRIPTS} ${noinst_SCRIPTS}; do if test -f $$f ; then chmod 755 $$f ; fi ; done
103 COMMON_FILE= common.m4
105 M4_DIST_FILES= \
106         TTL_74xx_DIL.m4 \
107         amphenol.m4 \
108         connector.m4 \
109         crystal.m4 \
110         generic.m4 \
111         gtag.m4 \
112         jerry.m4 \
113         linear.m4 \
114         logic.m4 \
115         lsi.m4 \
116         memory.m4 \
117         optical.m4 \
118         pci.m4 \
119         resistor_0.25W.m4 \
120         resistor_adjust.m4 \
121         resistor_array.m4 \
122         texas_inst_amplifier.m4 \
123         texas_inst_voltage_reg.m4 \
124         transistor.m4 
126 # These files are for old footprint libraries and will be
127 # removed in future releases
128 OBSOLETE_LIST_DIST_FILES=       \
129         TTL_74xx_DIL.list \
130         jerry.list \
131         linear.list \
132         logic.list \
133         lsi.list \
134         memory.list \
135         resistor_0.25W.list \
136         resistor_adjust.list \
137         resistor_array.list \
138         texas_inst_amplifier.list \
139         texas_inst_voltage_reg.list \
140         transistor.list
142 LIST_DIST_FILES= \
143         amphenol.list \
144         connector.list \
145         crystal.list \
146         generic.list \
147         gtag.list \
148         optical.list \
149         pci.list
151 INC_FILES= \
152         bga.inc \
153         amp.inc \
154         amphenol.inc \
155         bourns.inc \
156         candk.inc \
157         connector.inc \
158         cts.inc \
159         dil.inc \
160         geda.inc \
161         johnstech.inc \
162         minicircuits.inc \
163         misc.inc \
164         nichicon.inc \
165         optek.inc \
166         panasonic.inc \
167         pci.inc \
168         plcc.inc \
169         qfn.inc \
170         qfp.inc \
171         qfp2.inc \
172         qfpdj.inc \
173         resistor_adjust.inc \
174         rules.inc \
175         smt.inc \
176         to.inc \
177         zif.inc 
179 DAT_FILES= \
180         qfp.dat
182 M4_FILES=       ${M4_DIST_FILES} amp.m4 bourns.m4 candk.m4 cts.m4 geda.m4 johnstech.m4 minicircuits.m4 nichicon.m4 optek.m4 panasonic.m4
183 LIST_FILES=     ${LIST_DIST_FILES} amp.list bourns.list candk.list cts.list geda.list johnstech.list minicircuits.list nichicon.list \
184                 optek.list panasonic.list
186 LIB_FILES= ${COMMON_FILE} ${M4_FILES} ${LIST_FILES} ${INC_FILES} 
188 EXTRA_DIST+=    ListLibraryContents.sh ${COMMON_FILE} ${M4_DIST_FILES} ${OBSOLETE_LIST_DIST_FILES} \
189                 ${LIST_DIST_FILES} ${INC_FILES} \
190                 ${LIBCONTENTS} \
191                 ${DAT_FILES} gen_list.awk gen_m4.awk gen_geda_m4.awk gen_geda_list.awk
193 DISTCLEANFILES+=        ${LIBRARYFILENAME} ${LIBRARYFILENAME}.contents amp.m4 amp.list \
194         cts.m4 cts.list bourns.m4 bourns.list \
195         candk.m4 candk.list \
196         geda.m4 geda.list johnstech.m4 johnstech.list minicircuits.m4 minicircuits.list \
197         nichicon.m4 nichicon.list \
198         optek.m4 optek.list \
199         panasonic.m4 panasonic.list
201 ${LIBRARYFILENAME}: ${COMMON_FILE} ${INC_FILES} ${DAT_FILES} ${M4_FILES} CreateLibrary.sh
202         ${SHELL} ./CreateLibrary.sh -I $(srcdir) $@ $(srcdir)/${COMMON_FILE} ${M4_FILES}
204 ${LIBRARYFILENAME}.contents: ${COMMON_FILE} ${INC_FILES} ${DAT_FILES} ${LIST_FILES} CreateLibraryContents.sh
205         ${SHELL} ./CreateLibraryContents.sh -I $(srcdir) $(srcdir)/${COMMON_FILE} ${LIST_FILES} > $@
207 amp.list: amp.inc gen_list.awk
208         ${AWK} -f $(srcdir)/gen_list.awk name=amp $(srcdir)/amp.inc > $@
210 amp.m4: amp.inc gen_m4.awk
211         ${AWK} -f $(srcdir)/gen_m4.awk name=amp $(srcdir)/amp.inc > $@
213 bourns.list: bourns.inc gen_list.awk
214         ${AWK} -f $(srcdir)/gen_list.awk name=bourns $(srcdir)/bourns.inc > $@
216 bourns.m4: bourns.inc gen_m4.awk
217         ${AWK} -f $(srcdir)/gen_m4.awk name=bourns $(srcdir)/bourns.inc > $@
219 candk.list: candk.inc gen_list.awk
220         ${AWK} -f $(srcdir)/gen_list.awk name=candk $(srcdir)/candk.inc > $@
222 candk.m4: candk.inc gen_m4.awk
223         ${AWK} -f $(srcdir)/gen_m4.awk name=candk $(srcdir)/candk.inc > $@
225 cts.list: cts.inc gen_list.awk
226         ${AWK} -f $(srcdir)/gen_list.awk name=cts $(srcdir)/cts.inc > $@
228 cts.m4: cts.inc gen_m4.awk
229         ${AWK} -f $(srcdir)/gen_m4.awk name=cts $(srcdir)/cts.inc > $@
231 johnstech.list: johnstech.inc gen_list.awk
232         ${AWK} -f $(srcdir)/gen_list.awk name=johnstech $(srcdir)/johnstech.inc > $@
234 johnstech.m4: johnstech.inc gen_m4.awk
235         ${AWK} -f $(srcdir)/gen_m4.awk name=johnstech $(srcdir)/johnstech.inc > $@
237 minicircuits.list: minicircuits.inc gen_list.awk
238         ${AWK} -f $(srcdir)/gen_list.awk name=minicircuits $(srcdir)/minicircuits.inc > $@
240 minicircuits.m4: minicircuits.inc gen_m4.awk
241         ${AWK} -f $(srcdir)/gen_m4.awk name=minicircuits $(srcdir)/minicircuits.inc > $@
243 nichicon.list: nichicon.inc gen_list.awk
244         ${AWK} -f $(srcdir)/gen_list.awk name=nichicon $(srcdir)/nichicon.inc > $@
246 nichicon.m4: nichicon.inc gen_m4.awk
247         ${AWK} -f $(srcdir)/gen_m4.awk name=nichicon $(srcdir)/nichicon.inc > $@
249 optek.list: optek.inc gen_list.awk
250         ${AWK} -f $(srcdir)/gen_list.awk name=optek $(srcdir)/optek.inc > $@
252 optek.m4: optek.inc gen_m4.awk
253         ${AWK} -f $(srcdir)/gen_m4.awk name=optek $(srcdir)/optek.inc > $@
255 panasonic.list: panasonic.inc gen_list.awk
256         ${AWK} -f $(srcdir)/gen_list.awk name=panasonic $(srcdir)/panasonic.inc > $@
258 panasonic.m4: panasonic.inc gen_m4.awk
259         ${AWK} -f $(srcdir)/gen_m4.awk name=panasonic $(srcdir)/panasonic.inc > $@
261 geda.m4: geda.inc gen_geda_m4.awk
262         ${AWK} -f $(srcdir)/gen_geda_m4.awk $(srcdir)/geda.inc > $@
264 geda.list: geda.inc gen_geda_list.awk
265         ${AWK} -f $(srcdir)/gen_geda_list.awk $(srcdir)/geda.inc > $@