IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 30, 2006, 5:05:29 PM (20 years ago)
Author:
eugene
Message:

added Makefile.Common, cleanups, support for .so

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/gcompare/Makefile

    r10305 r10342  
     1default: gcompare
     2help:
     3        @echo "make options: gcompare (default)"
     4
    15include ../../Configure
    26HOME    =       $(ROOT)/src/gcompare
    3 default: all
    4 
    57BIN     =       $(HOME)/bin
    68LIB     =       $(HOME)/lib
     
    810SRC     =       $(HOME)/src
    911INC     =       $(HOME)/include
    10 DESTBIN =       $(BINDIR)
    11 DESTLIB =       $(LIBDIR)
    12 DESTINC =       $(INCDIR)
    13 DESTMAN =       $(MANDIR)
     12include ../../Makefile.Common
    1413
    15 CFLAGS  =       -I$(INC) -I$(INCDIR) $(INCDIRS)
    16 LFLAGS  =       -L$(LIB) -L$(LIBDIR) $(LIBDIRS) -lFITS -lohana $(LIBFLAGS)
     14LDFLAGS :=      -ldvo -lFITS -lohana $(LDFLAGS)
    1715
    18 INSTALL = gcompare
     16gcompare: $(BIN)/gcompare.$(ARCH)
     17install: $(DESTBIN)/gcompare
    1918
    20 OBJ     = \
     19GCOMPARE        = \
    2120$(SRC)/input.$(ARCH).o                          $(SRC)/output.$(ARCH).o                 \
    2221$(SRC)/compare.$(ARCH).o                        $(SRC)/sort.$(ARCH).o                   \
    2322$(SRC)/count_neighbors.$(ARCH).o                $(SRC)/nextline.$(ARCH).o               \
    24 $(SRC)/nextword.$(ARCH).o
     23$(SRC)/nextword.$(ARCH).o                       $(SRC)/gcompare.$(ARCH).o
    2524
    26 all: gcompare
    27 
    28 # dependancy rules for binary code ##########################
    29 .PRECIOUS: %.$(ARCH).o
    30 .PRECIOUS: $(BIN)/%.$(ARCH)
    31 .PRECIOUS: $(SRC)/%.$(ARCH).o
    32 
    33 %.$(ARCH).o : %.c
    34         $(CC) $(CFLAGS) -c $^ -o $@
    35 
    36 $(BIN)/%.$(ARCH) : $(SRC)/%.$(ARCH).o $(OBJ)
    37         @if [ ! -d $(BIN) ]; then mkdir -p $(BIN); fi
    38         $(CC) $^ -o $@ $(LFLAGS)
    39 
    40 $(DESTBIN)/%: $(BIN)/%.$(ARCH)
    41         @if [ ! -d $(DESTBIN) ]; then mkdir -p $(DESTBIN); fi
    42         rm -f $(DESTBIN)/$*
    43         cp $(BIN)/$*.$(ARCH) $(DESTBIN)/$*
    44 
    45 %.install:
    46         make $(DESTBIN)/$*
    47 
    48 $(INSTALL): % : $(BIN)/%.$(ARCH)
    49 
    50 # utilities #################################################
    51 clean:
    52         rm -f *~
    53         rm -f #*
    54         rm -f */*~
    55         rm -f */#*
    56         rm -f */*.o
    57         rm -f $(BIN)/gcompare.$(ARCH)
    58 
    59 dist: clean
    60         rm -f $(BIN)/gcompare
    61 
    62 install:
    63         for i in $(INSTALL); do make $$i.install; done
    64         mkdir -p $(DESTMAN)
    65         rm -f $(DESTMAN)/gcompare.1
    66         cp $(MAN)/gcompare.1 $(DESTMAN)/
     25$(GCOMPARE): $(INC)/gcompare.h
     26$(BIN)/gcompare.$(ARCH): $(GCOMPARE)
Note: See TracChangeset for help on using the changeset viewer.