IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 447


Ignore:
Timestamp:
Apr 19, 2004, 9:42:43 AM (22 years ago)
Author:
evanalst
Message:

Updated to make both static and dynamic libraries libpslib.
Added psString object to make.

File:
1 edited

Legend:

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

    r432 r447  
    1 #################################################################
     1###############################################################################
    22##
     3##  Makefile:   sysUtils
    34##
    4 #################################################################
     5##  $Revision: 1.3 $  $Name: not supported by cvs2svn $
     6##  $Date: 2004-04-19 19:42:43 $
     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
    514ifndef prefix
    615    export prefix=$(shell cd ../..;pwd)
    716endif
    817
    9 TARGET = libpsSysUtils.a
     18# Define the two targets to be built
    1019
    11 all: $(TARGET)
     20TARGET_STATIC  = libpslib.a
     21TARGET_DYNAMIC = libpslib.$(DLL)
     22
     23# Include the make global definitions for the project
    1224
    1325include ../Makefile.Globals
    1426
    15 SRC_OBJS = psMemory.o psError.o psAbort.o
     27# Set CFLAGS used by the implicit rule to compile .c
    1628
    17 libpsSysUtils.a: $(SRC_OBJS)
    18         $(AR) -r libpsSysUtils.a $(SRC_OBJS)
     29CFLAGS := $(CFLAGS_RELOC)
    1930
    20 install: $(TARGET)
     31# Define the source objects
     32 
     33SRC_OBJS = psMemory.o    \
     34           psError.o     \
     35           psAbort.o     \
     36           psString.o
     37
     38# Define PHONY target "all" which will make all the necessary items
     39
     40all: $(TARGET_STATIC) $(TARGET_DYNAMIC)
     41
     42# Rule to make static library
     43
     44libpslib.a: $(SRC_OBJS)
     45# The ar option -r is to add/replace object and -s is to create
     46# a symbol table in the archive
     47        $(AR) rcs ../$@ $(SRC_OBJS)
     48
     49# Rule to make dynamic library
     50
     51libpslib.$(DLL): $(SRC_OBJS)
     52        $(CC) $(LDFLAGS_DLL) $(SRC_OBJS) -o ../$@ 
     53
     54# Define PHONY target "install" which will install necessary files
     55
     56install: $(TARGET_STATIC) $(TARGET_DYNAMIC)
    2157        install *.h $(includedir)
    22         install $(TARGET) $(libexecdir)
     58        install ../$(TARGET_STATIC) $(libexecdir)
     59        install ../$(TARGET_DYNAMIC) $(libexecdir)
     60
     61# Define PHONY target "distclean" which will cleanup the distribution
    2362
    2463distclean:      clean
    25         $(RM) $(TARGET)
     64        $(RM) ../$(TARGET_STATIC)
     65        $(RM) ../$(TARGET_DYNAMIC)
     66        $(RM) $(libexecdir)/$(TARGET_STATIC)
     67        $(RM) $(libexecdir)/$(TARGET_DYNAMIC)
     68
     69# Define PHONY target "clean" which will cleanup the development area
    2670
    2771clean:
    28         @echo "    Deleting intermediate files for 'utilities - $(CFG)'"
     72        @echo "    Deleting intermediate files for 'sysUtils'"
    2973        $(RM) $(SRC_OBJS) *.lint
    3074
Note: See TracChangeset for help on using the changeset viewer.