API refactoring : l2tp
[vpp.git] / vpp / Makefile.am
index 214cc74..9ae0605 100644 (file)
@@ -46,9 +46,9 @@ nobase_include_HEADERS =                      \
 # install the API definition, so we can produce java bindings, etc.
 
 apidir = $(prefix)/vpp-api
-api_DATA = vpp-api/vpe.api
+api_DATA = vpp-api/vpe.api.json
 
-BUILT_SOURCES += vpp-api/vpe.api.h app/version.h
+BUILT_SOURCES += vpp-api/vpe.api.h app/version.h vpp-api/vpe.api.json
 
 app/version.o: app/version.h
 
@@ -121,14 +121,13 @@ if WITH_IPV6SR
   vpp_LDADD += -lcrypto
 endif
 
-SUFFIXES = .api.h .api
+# Set the suffix list
+SUFFIXES = .api.h .api .api.json
 
-%.api.h: %.api
-       @echo "  APIGEN  " $@ ;                                 \
-       mkdir -p `dirname $@` ;                                 \
-       $(CC) $(CPPFLAGS) -E -P -C -x c $^                      \
-       | vppapigen --input - --output $@ --show-name $@
+# The actual %.api.h rule is in .../build-data/packages/suffix-rules.mk
+# and requires a symbolic link at the top of the vpp source tree
 
+include $(top_srcdir)/suffix-rules.mk
 
 noinst_PROGRAMS += test_client