1# 2# This file and its contents are supplied under the terms of the 3# Common Development and Distribution License ("CDDL"), version 1.0. 4# You may only use this file in accordance with the terms of version 5# 1.0 of the CDDL. 6# 7# A full copy of the text of the CDDL should have accompanied this 8# source. A copy of the CDDL is also available via the Internet at 9# http://www.illumos.org/license/CDDL. 10# 11 12# 13# Copyright 2025 Oxide Computer Company 14# 15 16PROGS = \ 17 tznames \ 18 tzload \ 19 zoneinfo_dump 20 21SCRIPTS = \ 22 basic_tzs \ 23 tz_dump \ 24 tzname_17947 25 26PROGS32 = $(PROGS:%=%.32) 27PROGS64 = $(PROGS:%=%.64) \ 28 tzparams.64 \ 29 tzlist.64 30 31ROOTOPTDIR = $(ROOT)/opt/tz-tests 32ROOTOPTTESTS = $(ROOTOPTDIR)/tests 33ROOTOPTPROGS = $(PROGS32:%=$(ROOTOPTTESTS)/%) \ 34 $(PROGS64:%=$(ROOTOPTTESTS)/%) \ 35 $(SCRIPTS:%=$(ROOTOPTTESTS)/%) 36 37include $(SRC)/cmd/Makefile.cmd 38include $(SRC)/cmd/Makefile.ctf 39 40CSTD = $(CSTD_GNU17) 41CTF_MODE = link 42CPPFLAGS += -D_REENTRANT 43 44zoneinfo_dump.32 := LDLIBS += -lzoneinfo 45zoneinfo_dump.64 := LDLIBS64 += -lzoneinfo 46tzlist.64 := LDLIBS64 += -lzoneinfo 47 48.KEEP_STATE: 49 50all: $(PROGS32) $(PROGS64) 51 52install: $(ROOTOPTTESTS) .WAIT $(ROOTOPTPROGS) 53 54$(ROOTOPTPROGS): $(PROGS32) $(PROGS64) $(ROOTOPTDIR) 55 56$(ROOTOPTDIR): 57 $(INS.dir) 58 59$(ROOTOPTTESTS): $(ROOTOPTDIR) 60 $(INS.dir) 61 62$(ROOTOPTTESTS)/%: % 63 $(INS.file) 64 65$(ROOTOPTTESTS)/%: %.ksh 66 $(INS.rename) 67 68%.64: %.c 69 $(LINK64.c) -o $@ $< $(LDLIBS64) 70 $(POST_PROCESS) 71 72%.32: %.c 73 $(LINK.c) -o $@ $< $(LDLIBS) 74 $(POST_PROCESS) 75 76clobber: $(SUBDIRS) 77 $(RM) $(PROGS32) $(PROGS64) 78 79$(SUBDIRS): FRC 80 @cd $@; pwd; $(MAKE) $(TARGET) 81 82FRC: 83