1 # C and C++ rule generation for interfaces. 2 # 3 # Copyright (C) 2020, 2022 Paul Boddie <paul@boddie.org.uk> 4 # 5 # This program is free software; you can redistribute it and/or 6 # modify it under the terms of the GNU General Public License as 7 # published by the Free Software Foundation; either version 2 of 8 # the License, or (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, write to the Free Software 17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 # Boston, MA 02110-1301, USA 19 20 21 # Generate exported interfaces. 22 23 include $(IDL_MK_DIR)/export_interface_c.mk 24 include $(IDL_MK_DIR)/export_interface_cc.mk 25 26 # Generate routines. 27 28 include $(IDL_MK_DIR)/client_interface_c.mk 29 include $(IDL_MK_DIR)/client_interface_cc.mk 30 include $(IDL_MK_DIR)/server_interface_c.mk 31 include $(IDL_MK_DIR)/server_interface_cc.mk 32 33 # Extra rules to generate files from the interface descriptions. 34 35 # Generate an interface rule for each client interface. 36 37 $(foreach INTERFACE,$(CLIENT_INTERFACES_C),\ 38 $(eval $(call client_interface_c_template,$(INTERFACE)))) 39 40 $(foreach INTERFACE,$(CLIENT_INTERFACES_CC),\ 41 $(eval $(call client_interface_cc_template,$(INTERFACE)))) 42 43 # Generate an interface rule for each server interface. 44 45 $(foreach INTERFACE,$(call needed_interfaces,$(SERVER_INTERFACES_C)),\ 46 $(eval $(call server_interface_c_template,$(INTERFACE)))) 47 48 $(foreach INTERFACE,$(call needed_interfaces,$(SERVER_INTERFACES_CC)),\ 49 $(eval $(call server_interface_cc_template,$(INTERFACE)))) 50 51 # Generate rules for exported interfaces. 52 53 $(foreach INTERFACE,$(call needed_interfaces,$(CLIENT_INTERFACES_C) $(SERVER_INTERFACES_C)),\ 54 $(eval $(call export_interface_c_template,$(INTERFACE)))) 55 56 $(foreach INTERFACE,$(call needed_interfaces,$(CLIENT_INTERFACES_CC) $(SERVER_INTERFACES_CC)),\ 57 $(eval $(call export_interface_cc_template,$(INTERFACE))))