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

    r10305 r10342  
    44
    55include ../../Configure
    6 
    76HOME    =       $(ROOT)/src/gophot
    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 OBJ = \
     16gophot: $(BIN)/gophot.$(ARCH)
     17install: $(DESTBIN)/gophot
     18
     19GOPHOT = \
    2320$(SRC)/gophot.$(ARCH).o         $(SRC)/ConfigInit.$(ARCH).o \
    2421$(SRC)/message.$(ARCH).o        $(SRC)/dophot.$(ARCH).o \
     
    4340$(SRC)/feature_fluxes.$(ARCH).o $(SRC)/mediansky.$(ARCH).o
    4441
    45 $(OBJ)                : $(INC)/gophot.h $(INC)/prototypes.h
    46 $(BIN)/gophot.$(ARCH) : $(OBJ)
    47 gophot                : $(BIN)/gophot.$(ARCH)
    48 
    49 INSTALL = gophot
    50 
    51 # dependancy rules for binary code #########################
    52 .PRECIOUS: %.$(ARCH).o
    53 .PRECIOUS: $(BIN)/%.$(ARCH)
    54 
    55 %.$(ARCH).o : %.c
    56         $(CC) $(CFLAGS) -c $< -o $@
    57 
    58 $(BIN)/%.$(ARCH) : $(SRC)/%.$(ARCH).o
    59         @if [ ! -d $(BIN) ]; then mkdir -p $(BIN); fi
    60         $(CC) $^ -o $@ $(LFLAGS)
    61 
    62 $(DESTBIN)/%: $(BIN)/%.$(ARCH)
    63         @if [ ! -d $(DESTBIN) ]; then mkdir -p $(DESTBIN); fi
    64         rm -f $(DESTBIN)/$*
    65         cp $(BIN)/$*.$(ARCH) $(DESTBIN)/$*
    66 
    67 $(INSTALL) $(DEVEL): % : $(BIN)/%.$(ARCH)
    68 
    69 %.clean :
    70         rm -f $(BIN)/$*.$(ARCH)
    71 
    72 %.install:
    73         make $(DESTBIN)/$*
    74 
    75 # utilities #################################################
    76 
    77 install:
    78         for i in $(INSTALL); do make $$i.install; done
    79 
    80 clean: 
    81         rm -f $(BIN)/*.$(ARCH)
    82         rm -f `find . -name "*.o"`
    83         rm -f `find . -name "*~"`
    84         rm -f `find . -name "#*"`
     42$(GOPHOT): $(INC)/gophot.h $(INC)/prototypes.h
     43$(BIN)/gophot.$(ARCH): $(GOPHOT)
Note: See TracChangeset for help on using the changeset viewer.