IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 29, 2004, 11:43:11 AM (22 years ago)
Author:
desonia
Message:

tweaked Makefile to push auxillary files (*.d *.o) used during making
to a subdirectory, which reduces the chaff in the directory.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sysUtils/Makefile

    r986 r1338  
    33##  Makefile:   sysUtils
    44##
    5 ##  $Revision: 1.16 $  $Name: not supported by cvs2svn $
    6 ##  $Date: 2004-06-10 20:40:26 $
     5##  $Revision: 1.17 $  $Name: not supported by cvs2svn $
     6##  $Date: 2004-07-29 21:43:11 $
    77##
    88##  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3838           psString.o   
    3939
     40OBJS = $(addprefix makedir/,$(SRC_OBJS))
     41
    4042# Define PHONY target "all" which will make all the necessary items
    4143
     
    4446# Rule to make static library
    4547
    46 libpslib.a: $(SRC_OBJS)
     48libpslib.a: $(OBJS)
    4749# The ar option -r is to add/replace object and -s is to create
    4850# a symbol table in the archive
    49         $(AR) rcs ../$@ $(SRC_OBJS)
     51        $(AR) rcs ../$@ $(OBJS)
    5052
    5153# Define PHONY target "install" which will install necessary files
     
    6365clean:
    6466        @echo "    Deleting intermediate files for 'sysUtils'"
    65         $(RM) $(SRC_OBJS) *.lint
     67        $(RM) $(OBJS) *.lint
     68
     69cleandep:
     70        $(RM) $(OBJS:.o=.d)
    6671
    6772%.lint: %.c
    6873        splint +posixlib -exportlocal -realcompare $(INCLUDE_GLOBAL) $? > $@; cat $@
    6974
    70 %.d: %.c
     75makedir/%.o: %.c
     76        $(CC) -c $(CFLAGS) -o $@ $<
     77
     78makedir/%.d: %.c
    7179        $(CC) -MM $(CFLAGS) $< > $@.tmp
    72         sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' $@.tmp > $@
     80        sed 's|\($*\)\.o[ :]*|\1.o $@ : |g' $@.tmp > $@
    7381        $(RM) -f $@.tmp
    7482
    75 include $(SRC_OBJS:.o=.d)
     83include $(OBJS:.o=.d)
Note: See TracChangeset for help on using the changeset viewer.