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

    r10305 r10342  
    44
    55include ../../Configure
    6 
    76HOME    =       $(ROOT)/src/gastro
    87BIN     =       $(HOME)/bin
    98LIB     =       $(HOME)/lib
    10 INC     =       $(HOME)/include
    119SRC     =       $(HOME)/src
    1210MAN     =       $(HOME)/doc
    13 DESTBIN =       $(BINDIR)
    14 DESTLIB =       $(LIBDIR)
    15 DESTINC =       $(INCDIR)
    16 DESTMAN =       $(MANDIR)
     11INC     =       $(HOME)/include
     12include ../../Makefile.Common
    1713
    18 
    19 CFLAGS  =       -I$(INC) -I$(INCDIR) $(INCDIRS)
    20 LFLAGS  =       -L$(LIB) -L$(LIBDIR) $(LIBDIRS) -ldvo -lFITS -lohana $(LIBFLAGS)
     14LDFLAGS :=      -ldvo -lFITS -lohana $(LDFLAGS)
    2115
    22 # -----------------------
    23 OBJ     = \
     16gastro: $(BIN)/gastro.$(ARCH)
     17install: $(DESTBIN)/gastro
     18
     19GASTRO  = \
    2420$(SRC)/gastro.$(ARCH).o \
    2521$(SRC)/gstars.$(ARCH).o \
     
    4238$(SRC)/misc.$(ARCH).o
    4339
    44 #$(SRC)/gregions2.$(ARCH).o \
    45 #$(SRC)/gcatalog.$(ARCH).o \
    46 #$(SRC)/gptolemy.$(ARCH).o \
    47 #$(SRC)/g2mass.$(ARCH).o \
     40$(GASTRO): $(INC)/gastro.h
     41$(BIN)/gastro.$(ARCH): $(GASTRO)
    4842
    49 gastro: $(BIN)/gastro.$(ARCH)
    50 
    51 $(BIN)/gastro.$(ARCH): $(OBJ)
    52 
    53 $(OBJ): $(INC)/gastro.h
    54 
    55 INSTALL = gastro
    56 
    57 # generic dependancy rules for binary code #########################
    58 .PRECIOUS: %.$(ARCH).o
    59 .PRECIOUS: $(BIN)/%.$(ARCH)
    60 
    61 %.$(ARCH).o : %.c
    62         $(CC) $(CFLAGS) -c $< -o $@
    63 
    64 $(BIN)/%.$(ARCH) : $(SRC)/%.$(ARCH).o
    65         @if [ ! -d $(BIN) ]; then mkdir -p $(BIN); fi
    66         $(CC) $^ -o $@ $(LFLAGS)
    67 
    68 $(DESTBIN)/%: $(BIN)/%.$(ARCH)
    69         @if [ ! -d $(DESTBIN) ]; then mkdir -p $(DESTBIN); fi
    70         rm -f $(DESTBIN)/$*
    71         cp $(BIN)/$*.$(ARCH) $(DESTBIN)/$*
    72 
    73 $(INSTALL) $(DEVEL): % : $(BIN)/%.$(ARCH)
    74 
    75 %.clean :
    76         rm -f $(BIN)/$*.$(ARCH)
    77 
    78 %.install:
    79         make $(DESTBIN)/$*
    80 
    81 # utilities #################################################
    82 
    83 install:
    84         for i in $(INSTALL); do make $$i.install; done
    85 
    86 clean: 
    87         rm -f $(BIN)/*.$(ARCH)
    88         rm -f `find . -name "*.o"`
    89         rm -f `find . -name "*~"`
    90         rm -f `find . -name "#*"`
Note: See TracChangeset for help on using the changeset viewer.