IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 15440


Ignore:
Timestamp:
Nov 2, 2007, 4:04:36 PM (19 years ago)
Author:
eugene
Message:

fixed dependency rules

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20071015/Ohana/src/tools/Makefile

    r12842 r15440  
    1010BIN     =       $(HOME)/bin
    1111INC     =       $(HOME)/include
    12 
    13 FULL_CFLAGS   = $(CFLAGS)
    14 FULL_CPPFLAGS = $(CPPFLAGS) -I$(INC) -I$(DESTINC) $(INCDIRS) -D$(ARCH)
    15 FULL_LDFLAGS  = $(LDFLAGS) -L$(LIB) -L$(DESTLIB) $(LIBDIRS) -ldvo -lFITS -lohana $(LIBFLAGS)
    16 
    17 # these are all programs which just depend on a single c file: foo : foo.c
    18 # we use a special set of rules in this directory which expect this simplification
     12# include ../../Makefile.Common
    1913
    2014PROGRAMS = gconfig fhead ftable fields list_astro glockfile \
     
    2216medianfilter mefhead ckfits
    2317
    24 tools: $(PROGRAMS)
     18all tools: $(PROGRAMS)
    2519
    26 $(PROGRAMS): % : $(BIN)/%.$(ARCH)
     20BASE_CFLAGS   = $(CFLAGS)
     21BASE_CPPFLAGS = $(CPPFLAGS) -I$(INC) -I$(DESTINC) $(INCDIRS) -D$(ARCH)
     22BASE_LDFLAGS  = $(LDFLAGS) -L$(LIB) -L$(DESTLIB) $(LIBDIRS) $(LIBFLAGS)
    2723
    28 # copied from Makefile.Common : use a single c file: foo : foo.c
    29 .PRECIOUS: %.$(ARCH).o
    30 .PRECIOUS: $(BIN)/%.$(ARCH)
     24FULL_CFLAGS   = $(BASE_CFLAGS)
     25FULL_CPPFLAGS = $(BASE_CPPFLAGS)
     26FULL_LDFLAGS  = -ldvo -lFITS -lohana $(BASE_LDFLAGS)
     27
     28# these are all programs which just depend on a single c file: foo : foo.c
     29# we use a special set of rules in this directory which expect this simplification
    3130
    3231%.$(ARCH).o : %.c
    3332        $(CC) $(FULL_CFLAGS) $(FULL_CPPFLAGS) -c $< -o $@
     33        @echo "compiled $<"
     34        @echo ""
    3435
    3536$(BIN)/%.$(ARCH) : $(SRC)/%.$(ARCH).o
    3637        @if [ ! -d $(BIN) ]; then mkdir -p $(BIN); fi
    3738        $(CC) $(FULL_CFLAGS) -o $@ $^ $(FULL_LDFLAGS)
     39        @echo "compiled $*"
     40        @echo ""
    3841
    3942$(DESTBIN)/%: $(BIN)/%.$(ARCH)
     
    4144        rm -f $(DESTBIN)/$*
    4245        cp $(BIN)/$*.$(ARCH) $(DESTBIN)/$*
     46        @echo "installed $*"
     47        @echo ""
     48
     49$(PROGRAMS) : % : $(BIN)/%.$(ARCH)
     50
     51%.clean:
     52        rm -f $(SRC)/$*.$(ARCH).o
     53        rm -f $(BIN)/$*.$(ARCH)
    4354
    4455%.install:
     
    4859        for i in $(PROGRAMS); do make $$i.install || exit; done
    4960
    50 %.clean:
    51         rm -f $(SRC)/$*.$(ARCH).o
    52         rm -f $(BIN)/$*.$(ARCH)
    5361
    5462clean:
     
    6169        rm -rf $(BIN)
    6270        rm -rf $(LIB)
     71
     72# $@ : target filename
     73# $* : matched word (%)
     74# $< : first prereq
     75# $^ : all prereqs
     76
     77.PRECIOUS: %.$(ARCH).o
     78.PRECIOUS: $(BIN)/%.$(ARCH)
     79
Note: See TracChangeset for help on using the changeset viewer.