IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 577


Ignore:
Timestamp:
May 5, 2004, 10:42:11 AM (22 years ago)
Author:
harman
Message:

Updated makefile

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/collections/Makefile

    r485 r577  
     1###############################################################################
     2##
     3##  Makefile:   sysUtils
     4##
     5##  $Revision: 1.5 $  $Name: not supported by cvs2svn $
     6##  $Date: 2004-05-05 20:42:11 $
     7##
     8##  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     9###############################################################################
     10
     11# Define variable prefix to the top level project - psLib
     12# This is necessary for definition is Makefile.Globals uses prefix
     13
    114ifndef prefix
    215    export prefix=$(shell cd ../..;pwd)
    316endif
    417
    5 TARGET = libpsCollections.a
     18# Define the two targets to be built
    619
    7 all: $(TARGET)
     20TARGET_STATIC  = libpsCollections.a
     21TARGET_DYNAMIC = libpsCollections.$(DLL)
     22
     23# Include the make global definitions for the project
    824
    925include ../Makefile.Globals
    1026
    11 SRC_OBJS = \
    12     psArray.o \
    13     psBitMask.o \
    14     psSort.o \
    15     psArray.o
     27# Set CFLAGS used by the implicit rule to compile .c
    1628
    17 INCLUDES = -I$(includedir)
     29CFLAGS := $(CFLAGS_RELOC) -I../sysUtils
    1830
    19 %.o: %.c
    20         @echo "    Compiling $<. "
    21         $(CC) $(CFLAGS) -DPS_ALLOW_MALLOC $(INCLUDE_GLOBAL) $(INCLUDES) -c $< -o $@
     31# Define the source objects
     32 
     33SRC_OBJS = psBitSet.o    \
     34           psArray.o     \
     35           psSort.o
     36
     37# Define PHONY target "all" which will make all the necessary items
     38
     39all: $(TARGET_STATIC) $(TARGET_DYNAMIC)
     40
     41# Rule to make static library
    2242
    2343libpsCollections.a: $(SRC_OBJS)
    24         $(AR) -r libpsCollections.a $(SRC_OBJS)
     44# The ar option -r is to add/replace object and -s is to create
     45# a symbol table in the archive
     46        $(AR) rcs ../$@ $(SRC_OBJS)
    2547
    26 install: $(TARGET)
     48# Rule to make dynamic library
     49
     50libpsCollections.$(DLL): $(SRC_OBJS)
     51        $(CC) $(LDFLAGS_DLL) $(SRC_OBJS) -o ../$@ 
     52
     53# Define PHONY target "install" which will install necessary files
     54
     55install: $(TARGET_STATIC) $(TARGET_DYNAMIC)
    2756        install *.h $(includedir)
    28         install $(TARGET) $(libexecdir)
     57        install ../$(TARGET_STATIC) $(libexecdir)
     58        install ../$(TARGET_DYNAMIC) $(libexecdir)
     59
     60# Define PHONY target "distclean" which will cleanup the distribution
    2961
    3062distclean:      clean
    31         $(RM) $(TARGET)
     63        $(RM) ../$(TARGET_STATIC)
     64        $(RM) ../$(TARGET_DYNAMIC)
     65        $(RM) $(libexecdir)/$(TARGET_STATIC)
     66        $(RM) $(libexecdir)/$(TARGET_DYNAMIC)
     67
     68# Define PHONY target "clean" which will cleanup the development area
    3269
    3370clean:
    34         @echo "    Deleting intermediate files for 'utilities - $(CFG)'"
     71        @echo "    Deleting intermediate files for 'collections'"
    3572        $(RM) $(SRC_OBJS) *.lint
    3673
Note: See TracChangeset for help on using the changeset viewer.