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

    r10305 r10342  
     1default: uniphot
     2help:
     3        @echo "make options: uniphot (default)"
     4
    15include ../../Configure
    26HOME    =       $(ROOT)/src/uniphot
    3 CONFIG  =       $(ROOT)/config
    4 PROGRAM =       uniphot
    5 
    67BIN     =       $(HOME)/bin
    78LIB     =       $(HOME)/lib
    8 INC     =       $(HOME)/include
    99SRC     =       $(HOME)/src
    1010MAN     =       $(HOME)/doc
    11 DESTBIN =       $(BINDIR)
    12 DESTLIB =       $(LIBDIR)
    13 DESTINC =       $(INCDIR)
    14 DESTMAN =       $(MANDIR)
     11INC     =       $(HOME)/include
     12include ../../Makefile.Common
    1513
    16 #
    17 CFLAGS  =       -I$(INC) -I$(INCDIR) $(INCDIRS)
    18 LFLAGS  =       -L$(LIB) -L$(LIBDIR) $(LIBDIRS) -ldvo -lFITS -lohana $(LIBFLAGS)
     14LDFLAGS :=      -ldvo -lFITS -lohana $(LDFLAGS)
     15
     16uniphot: $(BIN)/uniphot.$(ARCH)
     17install: $(DESTBIN)/uniphot
    1918
    2019UNIPHOT = \
     
    3534$(SRC)/sort.$(ARCH).o
    3635
    37 OBJ = $(UNIPHOT)
    38 
    39 default: $(PROGRAM)
    40 
    4136$(UNIPHOT): $(INC)/uniphot.h
    42 
    43 # dependancy rules for binary code ##########################
    44 $(PROGRAM): $(BIN)/$(PROGRAM).$(ARCH)
    45 
    46 $(BIN)/$(PROGRAM).$(ARCH): $(OBJ)
    47         @if [ ! -d $(BIN) ]; then mkdir -p $(BIN); fi
    48         $(CC) $(OBJ) -o $(BIN)/$(PROGRAM).$(ARCH) $(LFLAGS)
    49 
    50 install: $(DESTBIN)/$(PROGRAM)
    51 
    52 $(DESTBIN)/$(PROGRAM): $(BIN)/$(PROGRAM).$(ARCH)
    53         @if [ ! -d $(DESTBIN) ]; then mkdir -p $(DESTBIN); fi
    54         rm -f $(DESTBIN)/$(PROGRAM)
    55         cp $(BIN)/$(PROGRAM).$(ARCH) $(DESTBIN)/$(PROGRAM)
    56 
    57 # utilities #################################################
    58 clean: 
    59         rm -f $(BIN)/*.$(ARCH)
    60         rm -f `find . -name "*.o"`
    61         rm -f `find . -name "*~"`
    62         rm -f `find . -name "#*"`
    63 
    64 .PRECIOUS: %.$(ARCH).o
    65 .PRECIOUS: $(BIN)/%.$(ARCH)
    66 
    67 %.$(ARCH).o : %.c
    68         $(CC) $(CFLAGS) -c $< -o $@
     37$(BIN)/uniphot.$(ARCH): $(UNIPHOT)
Note: See TracChangeset for help on using the changeset viewer.