#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#
# Copyright 2025 Hammerhead Project
#
# Hammerhead: Include cmd Makefile first to set up standard build environment
# This provides CPPFLAGS.master with proper include paths
include $(SRC)/cmd/Makefile.cmd
include ../Makefile.fmd
include $(SRC)/cmd/Makefile.cmd.64
# Hammerhead: Ensure RPC headers are generated before building fmd_rpc.c
# GNU Make requires explicit dependencies for generated headers
../common/fmd_rpc_adm.h: ../common/fmd_rpc_adm.x
$(RPCGEN) -CMN -h -o $@ $<
../common/fmd_rpc_api.h: ../common/fmd_rpc_api.x
$(RPCGEN) -CMN -h -o $@ $<
fmd_rpc.o: ../common/fmd_rpc_adm.h ../common/fmd_rpc_api.h