17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5f808c858Sraf# Common Development and Distribution License (the "License").
6f808c858Sraf# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
217c478bd9Sstevel@tonic-gate#
22f808c858Sraf# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
2505ede3dbSJohn Levon# Copyright (c) 2018, Joyent, Inc.
267c478bd9Sstevel@tonic-gate
277c478bd9Sstevel@tonic-gateLIBRARY=	libcurses.a
287c478bd9Sstevel@tonic-gateVERS=	.1
297c478bd9Sstevel@tonic-gate
307c478bd9Sstevel@tonic-gate# objects are grouped by source directory
317c478bd9Sstevel@tonic-gate# all of the libxcurses source files are in src/libc
327c478bd9Sstevel@tonic-gateOBJECTS= \
337c478bd9Sstevel@tonic-gate$(XCURSES)	$(GEN)		$(I18N)		$(MKS) \
347c478bd9Sstevel@tonic-gate$(STDIO)	$(WIDE)
357c478bd9Sstevel@tonic-gate
367c478bd9Sstevel@tonic-gate# XCURSES source files are in src/libc/xcurses
377c478bd9Sstevel@tonic-gateXCURSES= \
387c478bd9Sstevel@tonic-gateadd_wch.o	dupwin.o	longname.o	strname.o	wbrdr.o \
397c478bd9Sstevel@tonic-gateaddch.o		echo_wch.o	m_cc.o		termattr.o	wbrdr_st.o \
407c478bd9Sstevel@tonic-gateaddchn.o	echochar.o	meta.o		tgetent.o	wchgat.o \
417c478bd9Sstevel@tonic-gateaddnstr.o	endwin.o	move.o		tgetflag.o	wclear.o \
427c478bd9Sstevel@tonic-gateaddnws.o	flushinp.o	mvcur.o		tgetnum.o	wclrbot.o \
437c478bd9Sstevel@tonic-gateaddwchn.o	get_wch.o	mvwin.o		tgetstr.o	wclreol.o \
447c478bd9Sstevel@tonic-gateattr_on.o	getcchar.o	napms.o		tgoto.o		wdelch.o \
457c478bd9Sstevel@tonic-gateattron.o	getch.o		newpad.o	tigetfla.o	wget_wch.o \
467c478bd9Sstevel@tonic-gatebaudrate.o	getn_ws.o	newterm.o	tigetnum.o	wgetch.o \
477c478bd9Sstevel@tonic-gatebeep.o		getnstr.o	newwin.o	tigetstr.o	wgetn_ws.o \
487c478bd9Sstevel@tonic-gatebkgd.o		getwin.o	noecho.o	timeout.o	whln.o \
497c478bd9Sstevel@tonic-gatebkgdset.o	has.o		nonl.o		touched.o	whln_st.o \
507c478bd9Sstevel@tonic-gatebkgrnd.o	hln.o		numcode.o	touchwin.o	win_wch.o \
517c478bd9Sstevel@tonic-gatebkgrndst.o	hln_st.o	numfnam.o	tparm.o		win_wchn.o \
527c478bd9Sstevel@tonic-gateboolcode.o	in_wch.o	numname.o	tputs.o		winch.o \
537c478bd9Sstevel@tonic-gateboolfnam.o	in_wchn.o	overlay.o	trace.o		winchn.o \
547c478bd9Sstevel@tonic-gateboolname.o	inch.o		pecho_wc.o	unctrl.o	winnstr.o \
557c478bd9Sstevel@tonic-gatebox.o		inchn.o		pechoch.o	vid_attr.o	winnwstr.o \
567c478bd9Sstevel@tonic-gatebox_set.o	initscr.o	prefresh.o	vid_puts.o	wins_nws.o \
577c478bd9Sstevel@tonic-gatebrdr.o		innstr.o	printw.o	vidattr.o	wins_wch.o \
587c478bd9Sstevel@tonic-gatebrdr_st.o	innwstr.o	ptrmove.o	vw_print.o	winsch.o \
597c478bd9Sstevel@tonic-gatecbreak.o	ins_nws.o	qiflush.o	vw_scanw.o	winsdel.o \
607c478bd9Sstevel@tonic-gatechgat.o		ins_wch.o	redraw.o	vwprintw.o	winsnstr.o \
617c478bd9Sstevel@tonic-gateclear.o		insch.o		refresh.o	vwscanw.o	wmove.o \
627c478bd9Sstevel@tonic-gateclearok.o	insnstr.o	savetty.o	wacs.o		wredraw.o \
637c478bd9Sstevel@tonic-gateclrbot.o	intrflsh.o	scanw.o		wadd_wch.o	wrefresh.o \
647c478bd9Sstevel@tonic-gateclreol.o			scr_dump.o	waddch.o	wscrl.o \
657c478bd9Sstevel@tonic-gatecolor.o		isendwin.o	scrl.o		waddchn.o	wscrreg.o \
667c478bd9Sstevel@tonic-gatecopywin.o	key_name.o	scrreg.o	waddnstr.o	wsyncdn.o \
677c478bd9Sstevel@tonic-gatecurs_set.o	keyindex.o	setcchar.o	waddnws.o	wsyncup.o \
687c478bd9Sstevel@tonic-gatedelay.o		keyname.o	setup.o		waddwchn.o	wtimeout.o \
697c478bd9Sstevel@tonic-gatedelch.o		keypad.o	slk.o		wattr_on.o	wtouchln.o \
707c478bd9Sstevel@tonic-gatedeleteln.o	killchar.o	strcode.o	wattron.o	wunctrl.o \
717c478bd9Sstevel@tonic-gatedoupdate.o	killwch.o	strfnam.o	wbkgrnd.o
727c478bd9Sstevel@tonic-gate
737c478bd9Sstevel@tonic-gate# GEN source files are in src/libc/gen
747c478bd9Sstevel@tonic-gateGEN= \
757c478bd9Sstevel@tonic-gatebase.o		eprintf.o
767c478bd9Sstevel@tonic-gate
777c478bd9Sstevel@tonic-gate# I18N source files are in src/libc/i18n
787c478bd9Sstevel@tonic-gateI18N= \
797c478bd9Sstevel@tonic-gatem_strmsg.o	m_text.o
807c478bd9Sstevel@tonic-gate
817c478bd9Sstevel@tonic-gate# MKS source files are in src/libc/mks
827c478bd9Sstevel@tonic-gateMKS= \
837c478bd9Sstevel@tonic-gatem_cmdnam.o	m_errorx.o	m_ord.o		m_strdup.o \
847c478bd9Sstevel@tonic-gatem_crcpos.o	m_getenv.o	m_pathca.o	m_vsscan.o \
857c478bd9Sstevel@tonic-gatem_error.o	m_malloc.o	m_pathma.o
867c478bd9Sstevel@tonic-gate
877c478bd9Sstevel@tonic-gate# STDIO source files are in src/libc/stdio
887c478bd9Sstevel@tonic-gateSTDIO= \
897c478bd9Sstevel@tonic-gatevfscanf.o
907c478bd9Sstevel@tonic-gate
917c478bd9Sstevel@tonic-gate# WIDE source files are in src/libc/wide
927c478bd9Sstevel@tonic-gateWIDE= \
937c478bd9Sstevel@tonic-gatem_mbstow.o	m_wcsdup.o	wio_get.o	wio_put.o
947c478bd9Sstevel@tonic-gate
957c478bd9Sstevel@tonic-gate# include library definitions
967c478bd9Sstevel@tonic-gateinclude ../../Makefile.lib
977c478bd9Sstevel@tonic-gate
98f808c858SrafSRCDIR =	../src
99f808c858Sraf
1007c478bd9Sstevel@tonic-gateSRCS=		$(XCURSES:%.o=../src/libc/xcurses/%.c) \
1017c478bd9Sstevel@tonic-gate		$(GEN:%.o=../src/libc/gen/%.c) \
1027c478bd9Sstevel@tonic-gate		$(I18N:%.o=../src/libc/i18n/%.c) \
1037c478bd9Sstevel@tonic-gate		$(MKS:%.o=../src/libc/mks/%.c) \
1047c478bd9Sstevel@tonic-gate		$(STDIO:%.o=../src/libc/stdio/%.c) \
1057c478bd9Sstevel@tonic-gate		$(WIDE:%.o=../src/libc/wide/%.c)
1067c478bd9Sstevel@tonic-gate
1077c478bd9Sstevel@tonic-gateLIBS =		$(DYNLIB)
1087c478bd9Sstevel@tonic-gate
1097c478bd9Sstevel@tonic-gate# definitions for install target
1107c478bd9Sstevel@tonic-gateROOTLIBDIR=	$(ROOT)/usr/xpg4/lib
1117c478bd9Sstevel@tonic-gateROOTLIBDIR64=	$(ROOT)/usr/xpg4/lib/$(MACH64)
1127c478bd9Sstevel@tonic-gateROOTLIBS=	$(LIBS:%=$(ROOTLIBDIR)/%)
1137c478bd9Sstevel@tonic-gate
1147c478bd9Sstevel@tonic-gate
115*d3b5f563SJohn LevonCERRWARN +=	$(CNOWARN_UNINIT)
1167014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-unused-variable
1177014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-unused-label
1187014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-unused-function
1197014882cSRichard Lowe
12005ede3dbSJohn Levon# not linted
12105ede3dbSJohn LevonSMATCH=off
12205ede3dbSJohn Levon
1237c478bd9Sstevel@tonic-gateLDLIBS += -lc
1247c478bd9Sstevel@tonic-gate
1257c478bd9Sstevel@tonic-gateCPPFLAGS = -I../h -I../h/solaris2 -I../src/libc/xcurses $(CPPFLAGS.master)
1267c478bd9Sstevel@tonic-gate
1277c478bd9Sstevel@tonic-gate#
1287c478bd9Sstevel@tonic-gate# If and when somebody gets around to messaging this, CLOBBERFILE should not
1297c478bd9Sstevel@tonic-gate# be cleared (so that any .po file will be clobbered.
1307c478bd9Sstevel@tonic-gate#
131f808c858SrafCLOBBERFILES=	libcurses.so libcurses.so$(VERS)
1327c478bd9Sstevel@tonic-gate
1337c478bd9Sstevel@tonic-gate.KEEP_STATE:
1347c478bd9Sstevel@tonic-gate
1357c478bd9Sstevel@tonic-gateall: $(LIBS)
1367c478bd9Sstevel@tonic-gate
1377c478bd9Sstevel@tonic-gate
1387c478bd9Sstevel@tonic-gate#
1397c478bd9Sstevel@tonic-gate# Include library targets
1407c478bd9Sstevel@tonic-gate#
1417c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ
1427c478bd9Sstevel@tonic-gate
1437c478bd9Sstevel@tonic-gateobjs/%.o pics/%.o:	../src/libc/xcurses/%.c
1447c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1457c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1467c478bd9Sstevel@tonic-gate
1477c478bd9Sstevel@tonic-gateobjs/%.o pics/%.o:	../src/libc/gen/%.c
1487c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1497c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1507c478bd9Sstevel@tonic-gate
1517c478bd9Sstevel@tonic-gateobjs/%.o pics/%.o:	../src/libc/i18n/%.c
1527c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1537c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1547c478bd9Sstevel@tonic-gate
1557c478bd9Sstevel@tonic-gateobjs/%.o pics/%.o:	../src/libc/mks/%.c
1567c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1577c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1587c478bd9Sstevel@tonic-gate
1597c478bd9Sstevel@tonic-gateobjs/%.o pics/%.o:	../src/libc/narrow/%.c
1607c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1617c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1627c478bd9Sstevel@tonic-gate
1637c478bd9Sstevel@tonic-gateobjs/%.o pics/%.o:	../src/libc/stdio/%.c
1647c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1657c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1667c478bd9Sstevel@tonic-gate
1677c478bd9Sstevel@tonic-gateobjs/%.o pics/%.o:	../src/libc/wide/%.c
1687c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1697c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
170