118c2aff7Sartem# 218c2aff7Sartem# CDDL HEADER START 318c2aff7Sartem# 418c2aff7Sartem# The contents of this file are subject to the terms of the 518c2aff7Sartem# Common Development and Distribution License (the "License"). 618c2aff7Sartem# You may not use this file except in compliance with the License. 718c2aff7Sartem# 818c2aff7Sartem# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 918c2aff7Sartem# or http://www.opensolaris.org/os/licensing. 1018c2aff7Sartem# See the License for the specific language governing permissions 1118c2aff7Sartem# and limitations under the License. 1218c2aff7Sartem# 1318c2aff7Sartem# When distributing Covered Code, include this CDDL HEADER in each 1418c2aff7Sartem# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 1518c2aff7Sartem# If applicable, add the following below this CDDL HEADER, with the 1618c2aff7Sartem# fields enclosed by brackets "[]" replaced with your own identifying 1718c2aff7Sartem# information: Portions Copyright [yyyy] [name of copyright owner] 1818c2aff7Sartem# 1918c2aff7Sartem# CDDL HEADER END 2018c2aff7Sartem# 2118c2aff7Sartem# 22*d2ec54f7Sphitran# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 2318c2aff7Sartem# Use is subject to license terms. 2418c2aff7Sartem# 2518c2aff7Sartem# ident "%Z%%M% %I% %E% SMI" 2618c2aff7Sartem# 2718c2aff7Sartem 28*d2ec54f7SphitranSUBDIR = sunos 29*d2ec54f7Sphitran 3018c2aff7SartemHAL_PROG = hal-device hal-find-by-capability hal-find-by-property \ 3118c2aff7Sartem hal-get-property hal-set-property lshal 3218c2aff7Sartem 33*d2ec54f7SphitranHAL_LIB = hal-is-caller-privileged 34*d2ec54f7Sphitran 35*d2ec54f7SphitranSCRIPT_BIN = hal-fdi-validate 36*d2ec54f7Sphitran 37*d2ec54f7SphitranSCRIPT_LIB = hal-system-lcd-set-brightness hal-system-lcd-get-brightness \ 38*d2ec54f7Sphitran hal-system-power-hibernate hal-system-power-suspend \ 39*d2ec54f7Sphitran hal-system-power-reboot hal-system-power-shutdown hal-functions 4018c2aff7Sartem 4118c2aff7SartemSTORAGE_METHOD_PROG = hal-storage-closetray hal-storage-eject \ 4218c2aff7Sartem hal-storage-mount hal-storage-unmount \ 4318c2aff7Sartem hal-storage-zpool-export hal-storage-zpool-import 4418c2aff7Sartem 4518c2aff7SartemSTORAGE_PROG = $(STORAGE_METHOD_PROG) \ 4618c2aff7Sartem hal-storage-cleanup-mountpoint \ 4718c2aff7Sartem hal-storage-cleanup-all-mountpoints 4818c2aff7Sartem 4918c2aff7SartemPROGSRCS = $(PROG:%=%.c) $(STORAGE_PROG:%=%.c) 5018c2aff7Sartem 5118c2aff7SartemSTORAGE_OBJS = $(STORAGE_PROG:%=%.o) 5218c2aff7SartemSTORAGE_SHAREDOBJS = hal-storage-shared.o 5318c2aff7SartemSTORAGE_SHAREDSRCS = $(STORAGE_SHAREDOBJS:%.o=%.c) 5418c2aff7Sartem 5518c2aff7SartemSRCS = $(PROGSRCS) $(STORAGE_SHAREDSRCS) 5618c2aff7Sartem 57*d2ec54f7SphitranCLOBBERFILES += $(HAL_PROG) $(STORAGE_PROG) $(SCRIPT_BIN) $(SCRIPT_LIB) $(HAL_LIB) 5818c2aff7SartemCLEANFILES += $(STORAGE_SHAREDOBJS) $(STORAGE_OBJS) 5918c2aff7Sartem 6018c2aff7Sarteminclude ../../Makefile.cmd 6118c2aff7Sarteminclude ../Makefile.hal 6218c2aff7Sartem 6318c2aff7Sartem$(HAL_PROG) := LDLIBS += -lc -ldbus-1 -lhal 6418c2aff7Sartem 6518c2aff7Sartemlshal := LDLIBS += -ldbus-glib-1 -lglib-2.0 6618c2aff7Sartem 67*d2ec54f7Sphitran$(HAL_LIB) := LDLIBS += -lc -ldbus-1 -lpolkit $(ZIGNORE) -lglib-2.0 68*d2ec54f7Sphitran 6918c2aff7Sartem$(STORAGE_PROG) := LDLIBS += -lc -ldbus-1 -lglib-2.0 -lhal -lhal-storage -lbsm 7018c2aff7Sartem 7118c2aff7Sartem$(STORAGE_METHOD_PROG) := LDLIBS += -lpolkit 7218c2aff7Sartem 7318c2aff7SartemCPPFLAGS += $(HAL_DBUS_CPPFLAGS) $(HAL_GLIB_CPPFLAGS) $(HAL_CONFIG_CPPFLAGS) 7418c2aff7SartemCPPFLAGS += -I$(ROOT)/usr/include/hal 7518c2aff7SartemCPPFLAGS += -I$(ROOT)/usr/include/libpolkit 7618c2aff7SartemC99MODE = $(C99_ENABLE) 7718c2aff7Sartem 78*d2ec54f7SphitranROOTUSRSBINPROG = $(HAL_PROG:%=$(ROOTUSRSBIN)/%) \ 79*d2ec54f7Sphitran $(SCRIPT_BIN:%=$(ROOTUSRSBIN)/%) 8018c2aff7Sartem 8118c2aff7SartemROOTCMDDIR = $(ROOTLIB_HAL) 82*d2ec54f7SphitranROOTCMD = $(STORAGE_PROG:%=$(ROOTCMDDIR)/%) \ 83*d2ec54f7Sphitran $(HAL_LIB:%=$(ROOTCMDDIR)/%) \ 84*d2ec54f7Sphitran $(SCRIPT_LIB:%=$(ROOTCMDDIR)/%) 85*d2ec54f7Sphitran 86*d2ec54f7Sphitranall := TARGET= all 87*d2ec54f7Sphitraninstall := TARGET= install 88*d2ec54f7Sphitranclean := TARGET= clean 89*d2ec54f7Sphitranclobber := TARGET= clobber 9018c2aff7Sartem 9118c2aff7Sartem.KEEP_STATE: 9218c2aff7Sartem 93*d2ec54f7Sphitranall: $(HAL_PROG) $(STORAGE_PROG) $(SCRIPT_BIN) $(SCRIPT_LIB) $(HAL_LIB) $(SUBDIR) 9418c2aff7Sartem 9518c2aff7Sartem$(STORAGE_SHAREDOBJS): $(STORAGE_SHAREDSRCS) 9618c2aff7Sartem $(COMPILE.c) $(STORAGE_SHAREDSRCS) 9718c2aff7Sartem 9818c2aff7Sartemhal-storage-closetray: hal-storage-closetray.o $(STORAGE_SHAREDOBJS) 9918c2aff7Sartem $(LINK.c) hal-storage-closetray.o $(STORAGE_SHAREDOBJS) -o $@ $(LDLIBS) 10018c2aff7Sartem $(POST_PROCESS) 10118c2aff7Sartem 10218c2aff7Sartemhal-storage-eject: hal-storage-eject.o $(STORAGE_SHAREDOBJS) 10318c2aff7Sartem $(LINK.c) hal-storage-eject.o $(STORAGE_SHAREDOBJS) -o $@ $(LDLIBS) 10418c2aff7Sartem $(POST_PROCESS) 10518c2aff7Sartem 10618c2aff7Sartemhal-storage-mount: hal-storage-mount.o $(STORAGE_SHAREDOBJS) 10718c2aff7Sartem $(LINK.c) hal-storage-mount.o $(STORAGE_SHAREDOBJS) -o $@ $(LDLIBS) 10818c2aff7Sartem $(POST_PROCESS) 10918c2aff7Sartem 11018c2aff7Sartemhal-storage-unmount: hal-storage-unmount.o $(STORAGE_SHAREDOBJS) 11118c2aff7Sartem $(LINK.c) hal-storage-unmount.o $(STORAGE_SHAREDOBJS) -o $@ $(LDLIBS) 11218c2aff7Sartem $(POST_PROCESS) 11318c2aff7Sartem 11418c2aff7Sartemhal-storage-cleanup-mountpoint: hal-storage-cleanup-mountpoint.c \ 11518c2aff7Sartem $(STORAGE_SHAREDOBJS) 11618c2aff7Sartem $(LINK.c) hal-storage-cleanup-mountpoint.c \ 11718c2aff7Sartem $(STORAGE_SHAREDOBJS) -o $@ $(LDLIBS) 11818c2aff7Sartem $(POST_PROCESS) 11918c2aff7Sartem 12018c2aff7Sartemhal-storage-cleanup-all-mountpoints: hal-storage-cleanup-all-mountpoints.c \ 12118c2aff7Sartem $(STORAGE_SHAREDOBJS) 12218c2aff7Sartem $(LINK.c) hal-storage-cleanup-all-mountpoints.c \ 12318c2aff7Sartem $(STORAGE_SHAREDOBJS) -o $@ $(LDLIBS) 12418c2aff7Sartem $(POST_PROCESS) 12518c2aff7Sartem 12618c2aff7Sartemhal-storage-zpool-export: hal-storage-zpool.c $(STORAGE_SHAREDOBJS) 12718c2aff7Sartem $(LINK.c) -o $@ $(STORAGE_SHAREDOBJS) -DZPOOL_SUBCMD=\"export\" hal-storage-zpool.c $(LDLIBS) 12818c2aff7Sartem $(POST_PROCESS) 12918c2aff7Sartem 13018c2aff7Sartemhal-storage-zpool-import: hal-storage-zpool.c $(STORAGE_SHAREDOBJS) 13118c2aff7Sartem $(LINK.c) -o $@ $(STORAGE_SHAREDOBJS) -DZPOOL_SUBCMD=\"import\" hal-storage-zpool.c $(LDLIBS) 13218c2aff7Sartem $(POST_PROCESS) 13318c2aff7Sartem 13418c2aff7Sartemhal-device: hal-device.c 13518c2aff7Sartem $(LINK.c) -o $@ hal-device.c $(LDLIBS) 13618c2aff7Sartem $(POST_PROCESS) 13718c2aff7Sartem 13818c2aff7Sartemhal-find-by-capability: hal_find_by_capability.c 13918c2aff7Sartem $(LINK.c) -o $@ hal_find_by_capability.c $(LDLIBS) 14018c2aff7Sartem $(POST_PROCESS) 14118c2aff7Sartem 14218c2aff7Sartemhal-find-by-property: hal_find_by_property.c 14318c2aff7Sartem $(LINK.c) -o $@ hal_find_by_property.c $(LDLIBS) 14418c2aff7Sartem $(POST_PROCESS) 14518c2aff7Sartem 14618c2aff7Sartemhal-get-property: hal_get_property.c 14718c2aff7Sartem $(LINK.c) -o $@ hal_get_property.c $(LDLIBS) 14818c2aff7Sartem $(POST_PROCESS) 14918c2aff7Sartem 15018c2aff7Sartemhal-set-property: hal_set_property.c 15118c2aff7Sartem $(LINK.c) -o $@ hal_set_property.c $(LDLIBS) 15218c2aff7Sartem $(POST_PROCESS) 15318c2aff7Sartem 15418c2aff7Sartemlshal: lshal.c 15518c2aff7Sartem $(LINK.c) -o $@ lshal.c $(LDLIBS) 15618c2aff7Sartem $(POST_PROCESS) 15718c2aff7Sartem 158*d2ec54f7Sphitraninstall: all $(ROOTUSRSBINPROG) $(ROOTCMD) $(SUBDIR) 15918c2aff7Sartem 160*d2ec54f7Sphitranclean: $(SUBDIR) 16118c2aff7Sartem $(RM) $(CLEANFILES) 16218c2aff7Sartem 163*d2ec54f7Sphitran$(SUBDIR): FRC 164*d2ec54f7Sphitran @cd $@; pwd; $(MAKE) $(TARGET) 165*d2ec54f7Sphitran 166*d2ec54f7SphitranFRC: 167*d2ec54f7Sphitran 16818c2aff7Sarteminclude ../../Makefile.targ 169