1# 2# CDDL HEADER START 3# 4# The contents of this file are subject to the terms of the 5# Common Development and Distribution License (the "License"). 6# You may not use this file except in compliance with the License. 7# 8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9# or http://www.opensolaris.org/os/licensing. 10# See the License for the specific language governing permissions 11# and limitations under the License. 12# 13# When distributing Covered Code, include this CDDL HEADER in each 14# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15# If applicable, add the following below this CDDL HEADER, with the 16# fields enclosed by brackets "[]" replaced with your own identifying 17# information: Portions Copyright [yyyy] [name of copyright owner] 18# 19# CDDL HEADER END 20# 21# 22# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 23# Use is subject to license terms. 24# 25# Copyright 2024 Oxide Computer Company 26 27SUBDIRS = solaris 28 29PROG = hald 30OBJS = hald_marshal.o device.o device_info.o device_store.o hald.o \ 31 hald_dbus.o hald_runner.o ids.o logger.o property.o util.o \ 32 util_helper.o util_pm.o 33OBJS_SOL = devinfo.o devinfo_ieee1394.o devinfo_misc.o devinfo_pci.o devinfo_storage.o \ 34 devinfo_usb.o hotplug.o osspec.o sysevent.o devinfo_acpi.o \ 35 devinfo_cpu.o 36OBJS_COMMON = $(HEXDUMP_OBJS) 37OBJS_ALL = $(OBJS) $(OBJS_SOL:%=solaris/%) $(OBJS_COMMON) 38SRCS = $(OBJS:%.o=%.c) 39 40include ../../Makefile.cmd 41include ../Makefile.hal 42include $(SRC)/common/hexdump/Makefile.com 43 44ROOTCMDDIR = $(ROOTLIB_HAL) 45 46LDLIBS += -lc -lm -ldbus-1 -ldbus-glib-1 -lglib-2.0 -lgobject-2.0 \ 47 -ldevinfo -lsysevent -lnvpair -lkstat -lcfgadm 48NATIVE_LIBS += libdbus-1.so libdbus-glib-1.so libglib-2.0.so \ 49 libgobject-2.0.so libexpat.so 50 51all install $(PROG) := LDLIBS += -lexpat 52 53CPPFLAGS += $(HAL_DBUS_CPPFLAGS) $(HAL_GLIB_CPPFLAGS) $(HAL_CONFIG_CPPFLAGS) 54CSTD = $(CSTD_GNU99) 55 56CLOBBERFILES += hald_marshal.c hald_marshal.h 57 58all := TARGET= all 59install := TARGET= install 60clean := TARGET= clean 61clobber := TARGET= clobber 62$(PROG) := TARGET= all 63 64.KEEP_STATE: 65 66all: $(SUBDIRS) .WAIT $(PROG) 67 68hald_marshal.o: hald_marshal.h hald_marshal.c 69 70hald_marshal.h: hald_marshal.list 71 glib-genmarshal --prefix=hald_marshal hald_marshal.list --header >> xgen-gmh \ 72 && (cmp -s xgen-gmh hald_marshal.h || cp xgen-gmh hald_marshal.h) \ 73 && rm -f xgen-gmh xgen-gmh~ 74 75hald_marshal.c: hald_marshal.list 76 glib-genmarshal --prefix=hald_marshal hald_marshal.list --body >> xgen-gmc \ 77 && (cmp -s xgen-gmc hald_marshal.c || cp xgen-gmc hald_marshal.c) \ 78 && rm -f xgen-gmc xgen-gmc~ 79 80$(PROG): $(SUBDIRS) .WAIT $(OBJS_ALL) 81 $(LINK.c) -o $@ $(OBJS_ALL) $(LDLIBS) 82 $(POST_PROCESS) 83 84install: all $(ROOTCMD) $(SUBDIRS) 85 86clean: $(SUBDIRS) 87 $(RM) $(OBJS) $(OBJS_SOL) $(OBJS_COMMON) 88 89$(SUBDIRS): FRC 90 @cd $@; pwd; $(MAKE) $(TARGET) 91 92FRC: 93 94include $(SRC)/common/hexdump/Makefile.targ 95include ../../Makefile.targ 96