xref: /titanic_52/usr/src/uts/sparc/cmlb/Makefile (revision 0eb822a1c0c2bea495647510b75f77f0e57633eb)
1#
2# uts/sparc/cmlb/Makefile
3#
4# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
5# Use is subject to license terms.
6#
7#pragma 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#	Default build targets.
48#
49.KEEP_STATE:
50
51def:		$(DEF_DEPS)
52
53all:		$(ALL_DEPS)
54
55clean:		$(CLEAN_DEPS)
56		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
57
58clobber:	$(CLOBBER_DEPS)
59		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
60
61lint:		$(LINT_DEPS)
62
63modlintlib:	$(MODLINTLIB_DEPS)
64
65clean.lint:	$(CLEAN_LINT_DEPS)
66
67install:	$(INSTALL_DEPS)
68
69#
70#	Include common targets.
71#
72include $(UTSBASE)/sparc/Makefile.targ
73
74#
75#	Defines for local commands.
76#
77WLCC		= wlcc
78TOUCH		= touch
79WARLOCK		= warlock
80
81#
82#	Warlock targets
83#
84
85CMLB_FILES = $(CMLB_OBJS:%.o=%.ll)
86
87warlock: $(MODULE).ok
88
89%.ok:	$(CMLB_FILES)
90	$(TOUCH) $@
91
92%.ll: $(UTSBASE)/common/io/%.c
93	$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
94