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

    r1315 r1338  
    1212           psCoord.o
    1313
     14OBJS = $(addprefix makedir/,$(SRC_OBJS))
     15
    1416all: $(TARGET_STATIC)
    1517
    1618# Rule to make static library
    1719
    18 libpslib.a:     $(SRC_OBJS)
     20libpslib.a:     $(OBJS)
    1921# The ar option -r is to add/replace object and -s is to create
    2022# a symbol table in the archive
    21         $(AR) rcs ../$@ $(SRC_OBJS)
     23        $(AR) rcs ../$@ $(OBJS)
    2224
    2325# Define PHONY target "install" which will install necessary files
     
    3234clean:
    3335        @echo "    Deleting intermediate files for 'astronomy'"
    34         $(RM) $(SRC_OBJS) *.lint $(SRC_OBJS:.o=.i)
     36        $(RM) $(OBJS) *.lint $(SRC_OBJS:.o=.i)
     37
     38cleandep:
     39        $(RM) $(OBJS:.o=.d)
    3540
    3641%.lint: %.c
     
    4045        $(CC) -E $(CFLAGS) -o $@ $<
    4146
    42 %.o: %.i
     47makedir/%.o: %.c
    4348        $(CC) -c $(CFLAGS) -o $@ $<
    4449
    45 %.d: %.c
     50makedir/%.d: %.c
    4651        $(CC) -MM $(CFLAGS) $< > $@.tmp
    47         sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' $@.tmp > $@
     52        sed 's|\($*\)\.o[ :]*|\1.o $@ : |g' $@.tmp > $@
    4853        $(RM) -f $@.tmp
    4954
    50 include $(SRC_OBJS:.o=.d)
     55include $(OBJS:.o=.d)
Note: See TracChangeset for help on using the changeset viewer.