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

    r10305 r10342  
     1default: gastro2
     2help:
     3        @echo "make options: gastro2 (default)"
     4
    15include ../../Configure
    26HOME    =       $(ROOT)/src/gastro2
    3 PROGRAM =       gastro2
    4 
    57BIN     =       $(HOME)/bin
    68LIB     =       $(HOME)/lib
    7 INC     =       $(HOME)/include
    89SRC     =       $(HOME)/src
    910MAN     =       $(HOME)/doc
    10 DESTBIN =       $(BINDIR)
    11 DESTLIB =       $(LIBDIR)
    12 DESTINC =       $(INCDIR)
    13 DESTMAN =       $(MANDIR)
     11INC     =       $(HOME)/include
     12include ../../Makefile.Common
    1413
    15 
    16 CFLAGS  =       -I$(INC) -I$(INCDIR) $(INCDIRS)
    17 LFLAGS  =       -L$(LIB) -L$(LIBDIR) $(LIBDIRS) -ldvo -lFITS -lohana $(LIBFLAGS)
     14LDFLAGS :=      -ldvo -lFITS -lohana $(LDFLAGS)
    1815
    19 2MASS = \
     16gastro2: $(BIN)/gastro2.$(ARCH)
     17coordtest: $(BIN)/coordtest.$(ARCH)
     18extr2mass: $(BIN)/extr2mass.$(ARCH)
     19install: $(DESTBIN)/gastro2
     20
     21EXTR2MASS = \
    2022$(SRC)/extr2mass.$(ARCH).o \
    2123$(SRC)/ConfigInit.$(ARCH).o \
     
    2729$(SRC)/polyfit.$(ARCH).o
    2830
    29 GASTRO = \
     31GASTRO2 = \
    3032$(SRC)/plots.$(ARCH).o \
    3133$(SRC)/gheader2.$(ARCH).o \
     
    5456$(SRC)/rtext.$(ARCH).o
    5557
    56 #$(SRC)/gptolemy2.$(ARCH).o \
    57 #$(SRC)/gregions2.$(ARCH).o \
     58$(GASTRO2): $(INC)/gastro2.h
     59$(COORDTEST): $(INC)/gastro2.h
     60$(EXTR2MASS): $(INC)/gastro2.h
    5861
    59 OBJ = $(GASTRO)
    60 
    61 default: $(PROGRAM)
    62 
    63 all: $(PROGRAM) extr2mass
    64 
    65 $(GASTRO): $(INC)/gastro2.h
    66 
    67 coordtest: $(COORDTEST)
    68         $(CC) $(COORDTEST) -o $(BIN)/coordtest.linux $(LFLAGS)
    69 
    70 # dependancy rules for binary code ##########################
    71 $(PROGRAM): $(BIN)/$(PROGRAM).$(ARCH)
    72 
    73 $(BIN)/$(PROGRAM).$(ARCH): $(OBJ)
    74         @if [ ! -d $(BIN) ]; then mkdir -p $(BIN); fi
    75         $(CC) $(OBJ) -o $(BIN)/$(PROGRAM).$(ARCH) $(LFLAGS)
    76 
    77 install: $(DESTBIN)/$(PROGRAM)
    78 
    79 $(DESTBIN)/$(PROGRAM): $(BIN)/$(PROGRAM).$(ARCH)
    80         @if [ ! -d $(DESTBIN) ]; then mkdir -p $(DESTBIN); fi
    81         rm -f $(DESTBIN)/$(PROGRAM)
    82         cp $(BIN)/$(PROGRAM).$(ARCH) $(DESTBIN)/$(PROGRAM)
    83 
    84 # utilities #################################################
    85 clean: 
    86         rm -f $(BIN)/*.$(ARCH)
    87         rm -f `find . -name "*.o"`
    88         rm -f `find . -name "*~"`
    89         rm -f `find . -name "#*"`
    90 
    91 .PRECIOUS: %.$(ARCH).o
    92 .PRECIOUS: $(BIN)/%.$(ARCH)
    93 
    94 %.$(ARCH).o : %.c
    95         $(CC) $(CFLAGS) -c $< -o $@
     62$(BIN)/gastro2.$(ARCH): $(GASTRO2)
     63$(BIN)/coordtest.$(ARCH): $(COORDTEST)
     64$(BIN)/extr2mass.$(ARCH): $(EXTR2MASS)
Note: See TracChangeset for help on using the changeset viewer.