Convert a few more dissectors to wmem
[metze/wireshark/wip.git] / asn1 / Makefile.inc
index 078d180b276359bf0b7f556921ffa63342e6efa6..6c59cfcadd643e3910abe4c9ec4a75b3c4f3d45a 100644 (file)
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-all: generate_dissector
+DISSECTOR = $(top_srcdir)/epan/dissectors/packet-$(PROTOCOL_NAME).c
+# This header file need not exist/get generated.  It is only used when cleaning.
+DISSECTOR_HEADER=$(top_srcdir)/epan/dissectors/packet-$(PROTOCOL_NAME).h
 
-generate_dissector: $(DISSECTOR_FILES)
+all: generate_export $(DISSECTOR)
 
 generate_export: $(EXPORT_FILES)
 
 PROTO_OPT ?= -p $(PROTOCOL_NAME)
 
-$(DISSECTOR_FILES): $(top_srcdir)/tools/asn2wrs.py $(SRC_FILES) $(EXTRA_CNF) $(IMPORT_CNF)
-       python $(top_srcdir)/tools/asn2wrs.py \
+$(DISSECTOR): $(top_srcdir)/tools/asn2wrs.py $(SRC_FILES) $(EXTRA_CNF)
+       $(PYTHON) $(top_srcdir)/tools/asn2wrs.py \
                $(A2W_FLAGS) \
                $(PROTO_OPT) \
                -c $(srcdir)/$(PROTOCOL_NAME).cnf \
                -s $(srcdir)/packet-$(PROTOCOL_NAME)-template \
                -D $(srcdir) \
+               -O $(top_srcdir)/epan/dissectors \
                $(EXT_ASN_FILE_LIST) $(ASN_FILE_LIST) $(EXT_ASN_FILE_LIST_LATE)
 
-ifdef EXPORT_FILES
-$(EXPORT_FILES): $(top_srcdir)/tools/asn2wrs.py $(SRC_FILES) $(EXTRA_CNF)
-       python $(top_srcdir)/tools/asn2wrs.py \
+$(EXPORT_FILES): $(top_srcdir)/tools/asn2wrs.py $(SRC_FILES)
+       $(PYTHON) $(top_srcdir)/tools/asn2wrs.py \
                -E $(A2W_FLAGS) \
                $(PROTO_OPT) \
                -c $(srcdir)/$(PROTOCOL_NAME).cnf \
                -D $(srcdir) \
                $(EXT_ASN_FILE_LIST) $(ASN_FILE_LIST) $(EXT_ASN_FILE_LIST_LATE)
-endif
-
-copy_files: generate_dissector
-       cp $(DISSECTOR_FILES) $(top_srcdir)/epan/dissectors/
 
+# Don't clean these up until/unless we start building them...
+#$(DISSECTOR)
+#$(DISSECTOR_HEADER)
 CLEANFILES = \
        parsetab.py \
        parsetab.pyc \
-       $(DISSECTOR_FILES) \
        *-exp.cnf \
-       packet-*-{dis-tab,ettarr,ett,fn,hfarr,hf,table*,val}.[hc]
+       packet-*-{dis-tab,ettarr,ett,exp,fn,hfarr,hf,table*,val}.[hc]
 
+MAINTAINERCLEANFILES = \
+       Makefile.in