jdk/make/common/internal/NativeCompileRules.gmk
author kvn
Wed, 05 Mar 2008 11:33:31 -0800
changeset 210 6da234892f4a
parent 2 90ce3da70b43
child 5506 202f599c92aa
permissions -rw-r--r--
6671250: In Parse::do_if() old Cmp node 'c' should be replaced with new one after BoolNode transformation Summary: In Parse::do_if() 'c' (CmpNode) node may be changed during BoolNode transformation so 'c' may became dead but the node is referenced later in the code. Reviewed-by: never
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
# Copyright 1995-2007 Sun Microsystems, Inc.  All Rights Reserved.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
# published by the Free Software Foundation.  Sun designates this
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
# by Sun in the LICENSE file that accompanied this code.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
# accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
# CA 95054 USA or visit www.sun.com if you need additional information or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
# have any questions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
# Native C/C++ Compile Rules
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
# INCREMENTAL_BUILD: Record the #include file dependencies.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
# NOTE: We build make include files with the suffix
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
#       $(DEPEND_SUFFIX) on every compilation. These are initially 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
#       created as temp files just in case a ^C kills it in the middle.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
#	Compiler is smart enough to handle ^C and not create the .o file, or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
#	is supposed to be that smart, but the .$(DEPEND_SUFFIX) file 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
#       creation here isn't.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
#	These .$(DEPEND_SUFFIX) files are included by Library.gmk and 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
#       Program.gmk, when they exist (Search for 'make dependencies').
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
ifeq ($(INCREMENTAL_BUILD),true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
$(OBJDIR)/%.$(DEPEND_SUFFIX): %.c
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
	@$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
	@$(ECHO) "Creating $@"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
	@$(RM) $@.temp
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
	@$(CC) $(CC_DEPEND) $(CPPFLAGS) $< 2> $(DEV_NULL) | \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
	    $(CC_DEPEND_FILTER) > $@.temp
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
	@$(MV) $@.temp $@
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
$(OBJDIR)/%.$(DEPEND_SUFFIX): %.cpp
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
	@$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
	@$(ECHO) "Creating $@"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
	@$(RM) $@.temp
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
	@$(CXX) $(CC_DEPEND) $(CPPFLAGS) $(CXXFLAGS) $< 2> $(DEV_NULL) | \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
	    $(CC_DEPEND_FILTER) > $@.temp
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
	@$(MV) $@.temp $@
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
endif # INCREMENTAL_BUILD
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
# C, C++, asm files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
# Normal or parallel compile rule is the same, but batch compiles require
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
#  we save up the sources files that use the same compile line so that we
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
#  can do one compile line.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
ifneq ($(COMPILE_APPROACH), batch)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
$(OBJDIR)/%.$(OBJECT_SUFFIX): %.c
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
	@$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
	$(COMPILE.c) $(CC_OBJECT_OUTPUT_FLAG)$@ $(CFLAGS_GPROF) $<
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
	@$(check-conventions)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
$(OBJDIR)/%.$(OBJECT_SUFFIX): %.cpp
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
	@$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
	$(COMPILE.cc) $(CC_OBJECT_OUTPUT_FLAG)$@ $(CFLAGS_GPROF) $<
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
	@$(check-conventions)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
  
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
  #
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
  # Batch compiling might be faster if the compiler was smart about recognizing
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
  #   optimization opportunities available when all files are being compiled
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
  #   the same way. Unfortunately this is rare.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
  #   Automatic pre-compiled headers (pch) might be a possibility so we
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
  #   add any auto pch options here.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
  # So we save all the source files that have the same compile line as the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
  #   first file. A normal compile pass is made after the batch compile
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
  #   to catch anything missed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
  # If the compilers had a -o option that allowed us to direct where to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
  #   write the object files to, then we would not need to save the object
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
  #   file list or move them from the make directory to the build directory.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
  #
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
  # Source names
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
  COMPILE_LIST.c         = $(OBJDIR)/.source_names_c
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
  COMPILE_LIST.cpp       = $(OBJDIR)/.source_names_cpp
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
  # Object file list
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
  COMPILE_OBJ_LIST.c     = $(OBJDIR)/.obj_names_c
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
  COMPILE_OBJ_LIST.cpp   = $(OBJDIR)/.obj_names_cpp
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
  
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
  # The compile line
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
  COMPILE_BATCH.c        = $(OBJDIR)/.compile_c
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
  COMPILE_BATCH.cpp      = $(OBJDIR)/.compile_cpp
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
  # The compile line for the current target
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
  THIS_COMPILE_BATCH.c   = $(COMPILE_BATCH.c)-$(@F)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
  THIS_COMPILE_BATCH.cpp = $(COMPILE_BATCH.cpp)-$(@F)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
$(OBJDIR)/%.$(OBJECT_SUFFIX): %.c
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
	@$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
	@$(ECHO) "$(COMPILE.c) $(CFLAGS_GPROF)" > $(THIS_COMPILE_BATCH.c)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
	@if [ ! -s $(COMPILE_BATCH.c) ] ; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
	  $(CP) $(THIS_COMPILE_BATCH.c) $(COMPILE_BATCH.c) ; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
	  $(ECHO) $< > $(COMPILE_LIST.c); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
	  $(ECHO) $(@F) > $(COMPILE_OBJ_LIST.c); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
	elif [ "`$(DIFF) -w -b $(THIS_COMPILE_BATCH.c) $(COMPILE_BATCH.c)`" \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
	       = "" ] ; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
	  $(ECHO) $< >> $(COMPILE_LIST.c); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
	  $(ECHO) $(@F) >> $(COMPILE_OBJ_LIST.c); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
	fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
	@$(RM) $(THIS_COMPILE_BATCH.c)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
	@$(check-conventions)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
$(OBJDIR)/%.$(OBJECT_SUFFIX): %.cpp
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
	@$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
	@$(ECHO) "$(COMPILE.cpp) $(CFLAGS_GPROF)" > $(THIS_COMPILE_BATCH.cpp)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
	@if [ ! -s $(COMPILE_BATCH.cpp) ] ; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
	  $(CP) $(THIS_COMPILE_BATCH.cpp) $(COMPILE_BATCH.cpp) ; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
	  $(ECHO) $< > $(COMPILE_LIST.cpp); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
	  $(ECHO) $(@F) > $(COMPILE_OBJ_LIST.cpp); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
	elif [ "`$(DIFF) -w -b $(THIS_COMPILE_BATCH.cpp) $(COMPILE_BATCH.cpp)`"\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
	       = "" ] ; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
	  $(ECHO) $< >> $(COMPILE_LIST.cpp); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
	  $(ECHO) $(@F) >> $(COMPILE_OBJ_LIST.cpp); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
	fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
	@$(RM) $(THIS_COMPILE_BATCH.cpp)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
	@$(check-conventions)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
batch_compile: $(FILES_o)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
	@$(ECHO) "Doing batch compilations"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
	@if [ -s $(COMPILE_LIST.c) ] ; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
	  $(ECHO) "$(COMPILE.c) $(CFLAGS_GPROF) $(AUTOMATIC_PCH_OPTION) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
	   `$(CAT) $(COMPILE_LIST.c)`" ; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
	  ( $(COMPILE.c) $(CFLAGS_GPROF) $(AUTOMATIC_PCH_OPTION) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
	    `$(CAT) $(COMPILE_LIST.c)` && \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
	    $(ECHO) "$(MV) `$(CAT) $(COMPILE_OBJ_LIST.c)` $(OBJDIR)" && \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
	    $(MV) `$(CAT) $(COMPILE_OBJ_LIST.c)` $(OBJDIR) ) || exit 1 ; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
	fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
	@if [ -s $(COMPILE_LIST.cpp) ] ; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
	  $(ECHO) "$(COMPILE.cpp) $(CFLAGS_GPROF) $(AUTOMATIC_PCH_OPTION) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
	   `$(CAT) $(COMPILE_LIST.cpp)`" ; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
	  ( $(COMPILE.cpp) $(CFLAGS_GPROF) $(AUTOMATIC_PCH_OPTION) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
	    `$(CAT) $(COMPILE_LIST.cpp)` && \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
	    $(ECHO) "$(MV) `$(CAT) $(COMPILE_OBJ_LIST.cpp)` $(OBJDIR)" && \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
	    $(MV) `$(CAT) $(COMPILE_OBJ_LIST.cpp)` $(OBJDIR) ) || exit 1 ; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
	fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
	@$(RM) $(COMPILE_BATCH.c)   $(COMPILE_LIST.c)   $(COMPILE_OBJ_LIST.c)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
	@$(RM) $(COMPILE_BATCH.cpp) $(COMPILE_LIST.cpp) $(COMPILE_OBJ_LIST.cpp)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
# newer as does not handle c++ style comments
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
$(OBJDIR)/%.$(OBJECT_SUFFIX): %.s
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
    ifneq ($(CC_VERSION), gcc)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
	@$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
	$(COMPILE.s) $(CC_OBJECT_OUTPUT_FLAG)$@ $<
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
    else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
	@$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
	$(CPP) -x assembler-with-cpp $< | $(COMPILE.s) -o $@
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
    endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
	@$(check-conventions)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
# Quick hack for making the compiler generate just the assembly file.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
#	$ gnumake obj/sparc/myfile.s
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
$(OBJDIR)/%.s: %.c
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
	@$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
	$(COMPILE.c) $(CC_OBJECT_OUTPUT_FLAG)$@ -S $<
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
	@$(check-conventions)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
# remove the intermediate files from the directories.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
#    (If VARIANT=OPT, this removes all debug and fastdebug files too)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
clobber clean::
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
	$(RM) -r $(OBJDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
	$(RM) -r $(OBJDIR)_*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
# Lint support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
# (The 'lint' rule below is an older rule not using the .$(LINT_SUFFIX) files)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
ifeq ($(PLATFORM), solaris)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
$(OBJDIR)/%.$(LINT_SUFFIX): %.c
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
	@$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
	$(LINT.c) -dirout=$(OBJDIR) -c $<
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
lint.clean:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
	$(RM) $(OBJDIR)/*.$(LINT_SUFFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
# Old rule
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
lint: $(FILES_c)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
        ifneq ($(FILES_c),)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
	  $(LINT.c) -Ncheck -Nlevel=3 $? $(LDLIBS) > lint.$(ARCH) 2>&1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
        endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
.PHONY: batch_compile
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214