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/dataManip/Makefile

    r1264 r1338  
    1313           psFFT.o \
    1414           psMinimize.o \
    15            
     15 
     16OBJS = $(addprefix makedir/,$(SRC_OBJS))
     17         
    1618all: $(TARGET_STATIC)
    1719
     
    2123# Rule to make static library
    2224
    23 libpslib.a:     $(SRC_OBJS)
     25libpslib.a:     $(OBJS)
    2426# The ar option -r is to add/replace object and -s is to create
    2527# a symbol table in the archive
    26         $(AR) rcs ../$@ $(SRC_OBJS)
     28        $(AR) rcs ../$@ $(OBJS)
    2729
    2830# Define PHONY target "install" which will install necessary files
     
    3739clean:
    3840        @echo "    Deleting intermediate files for 'sysUtils'"
    39         $(RM) $(SRC_OBJS) *.lint $(SRC_OBJS:.o=.i)
     41        $(RM) $(OBJS) *.lint $(SRC_OBJS:.o=.i)
     42
     43cleandep:
     44        $(RM) $(OBJS:.o=.d)
    4045
    4146%.lint: %.c
     
    4550        $(CC) -E $(CFLAGS) -o $@ $<
    4651
    47 %.o: %.i
     52makedir/%.o: %.c
    4853        $(CC) -c $(CFLAGS) -o $@ $<
    4954
    50 %.d: %.c
     55makedir/%.d: %.c
    5156        $(CC) -MM $(CFLAGS) $< > $@.tmp
    52         sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' $@.tmp > $@
     57        sed 's|\($*\)\.o[ :]*|\1.o $@ : |g' $@.tmp > $@
    5358        $(RM) -f $@.tmp
    5459
    55 include $(SRC_OBJS:.o=.d)
     60include $(OBJS:.o=.d)
Note: See TracChangeset for help on using the changeset viewer.