xref: /titanic_52/usr/src/uts/sparc/cmlb/Makefile (revision 4e5b757fbcf21077677360be274461dcd9064106)
1#
2# uts/sparc/cmlb/Makefile
3#
4# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5# Use is subject to license terms.
6#
7#ident	"%Z%%M%	%I%	%E% SMI"
8#
9#	This makefile drives the production of the cmlb "misc"
10#	kernel module.
11#
12#
13#
14#	Path to the base of the uts directory tree (usually /usr/src/uts).
15#
16UTSBASE	= ../..
17
18#
19#	Define the module and object file sets.
20#
21MODULE		= cmlb
22OBJECTS		= $(CMLB_OBJS:%=$(OBJS_DIR)/%)
23LINTS		= $(CMLB_OBJS:%.o=$(LINTS_DIR)/%.ln)
24WARLOCK_OUT	= $(CMLB_OBJS:%.o=%.ll)
25WARLOCK_OK	= $(MODULE).ok
26ROOTMODULE	= $(ROOT_MISC_DIR)/$(MODULE)
27
28#
29#	Include common rules.
30#
31include $(UTSBASE)/sparc/Makefile.sparc
32
33#
34#	Define targets
35#
36ALL_TARGET	= $(BINARY)
37LINT_TARGET	= $(MODULE).lint
38INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
39
40#
41#	Overrides.
42#
43DEBUG_FLGS	=
44DEBUG_DEFS	+= $(DEBUG_FLGS)
45
46#
47# For now, disable these lint checks; maintainers should endeavor
48# to investigate and remove these for maximum lint coverage.
49# Please do not carry these forward to new Makefiles.
50#
51LINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
52LINTTAGS	+= -erroff=E_ASSIGN_NARROW_CONV
53LINTTAGS	+= -erroff=E_STATIC_UNUSED
54LINTTAGS	+= -erroff=E_SUSPICIOUS_COMPARISON
55
56#
57#	Default build targets.
58#
59.KEEP_STATE:
60
61def:		$(DEF_DEPS)
62
63all:		$(ALL_DEPS)
64
65clean:		$(CLEAN_DEPS)
66		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
67
68clobber:	$(CLOBBER_DEPS)
69		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
70
71lint:		$(LINT_DEPS)
72
73modlintlib:	$(MODLINTLIB_DEPS)
74
75clean.lint:	$(CLEAN_LINT_DEPS)
76
77install:	$(INSTALL_DEPS)
78
79#
80#	Include common targets.
81#
82include $(UTSBASE)/sparc/Makefile.targ
83
84#
85#	Defines for local commands.
86#
87WLCC		= wlcc
88TOUCH		= touch
89WARLOCK		= warlock
90
91#
92#	Warlock targets
93#
94warlock: $(WARLOCK_OK)
95
96$(WARLOCK_OK):	$(WARLOCK_OUT)
97	$(TOUCH) $@
98
99%.ll: $(UTSBASE)/common/io/%.c
100	$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
101