swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Makefile.conf


From: Ho-Sheng Hsiao
Subject: Makefile.conf
Date: Sat, 8 Feb 1997 11:05:03 -0500 (EST)


### Configure this file so Swarm knows about your environment. Some day
###   we will try to use GNU autoconf to do this for you.

### SETUP:  Canned setup for sites that build architecture-specific.  
### binaries (normal user use NONE and assign values to OTHERLIBDIRS
### and OTHERINCDIRS).  legal values: (NONE,SFI,nelson,umich);

### OTHERINCDIRS needs to be set so Swarm can find X11, tcl, tk, 
###   libtclobjc, and objc include files. Ie, <X11/Xlib.h>, <tcl.h>,
###   and <objc/Object.h> all need to be includable.
###

### OTHERLIBDIRS needs to be set so Swarm can find X11, Tcl, Tk, BLT,
###   tclobjc, and objc libs. Note: we use the file libtcl.a, not libtcl7.4.a
###   Insure that libtcl.a is really tcl7.4, libtk.a is really tk4.0.

### OTHERLIBS are other libraries you might need to link to compile
###   Swarm code. (-lsocket, for instance, or maybe -liberty).

### SYS: Induce canned options for a supported platform.  
### legal values: (solaris,hpux,linux,sgi)

### LDCONFIG: Use the distributed binary Swarm kernel (which has relevant
### portions of several system libraries linked into it), or use the
### local swarm library archives, along with local system libraries.
### legal values: (bin,archive)

SETUP=hhh
SYS=linux
LDCONFIG=shared

### for SETUP="NONE", fill in here...
SYS=
OTHERINCDIRS=
OTHERLIBDIRS=
SYSDEPLIBS=

ifeq ($(SETUP),SFI)
# SFI's setup
SYS=solaris
### the following 4 variables are needed to *make* binary distributions
TCLINC=/usr/local/include/tcl7.5
TKINC=/usr/local/include/tk4.1
BLTINC=/opt/local/blt/include
TCLOBJCINC=/net/user/swarm/support-swarm/libtclobjc-1.1b6
OTHERINCDIRS=-I$(TCLOBJCINC) -I$(BLTINC) -I$(TCLINC) -I$(TKINC)
-I/opt/X11R6/include -I/opt/local/include
OTHERLIBDIRS=-L/opt/X11R6/lib -L/opt/local/blt/lib -L/opt/local/lib
-L/net/user/swarm/support-swarm/libtclobjc-1.1b6
endif

ifeq ($(SETUP),umich)
SYS=hpux
BLTINC=/usr/local/blt-2.1/include
OTHERINCDIRS=-I$(TCLOBJCINC) -I$(BLTINC) -I$(TCLINC) -I$(TKINC)
-I/opt/X11R6/include -I/opt/local/include
OTHERINCDIRS=-I/usr/include/X11R5 -I/usr/local/blt-2.1/include
-I/usr/local/include
OTHERLIBDIRS=-L/usr/lib/X11R5  -L/usr/local/blt-2.1/lib -L/usr/local/lib 
endif

ifeq ($(SETUP),nelson)
# Nelson's Linux (RedHat 3.0.3) box (ELF, gcc 2.7.2, libc 5.2.18)
SYS=linux
OTHERINCDIRS=-I/usr/include/tcl
OTHERLIBDIRS=-L/usr/X11R6/lib
endif

ifeq ($(SETUP),glen)
# glen's Linux (Slackware 3.1) box (ELF, gcc 2.7.2, libc 5.3.12)
SYS=linux
OTHERINCDIRS=-I/usr/include
OTHERLIBDIRS=-L/usr/X11R6/lib -L/usr/lib
SYSDEPLIBS=-ldl
endif

ifeq ($(SETUP),hhh)
# hhh local setup. Based on Glen's.
# glen's Linux (Slackware 3.1) box (ELF, gcc 2.7.2, libc 5.3.12)
SYS=linux
OTHERINCDIRS=-I/usr/include -I/usr/include/tcl
OTHERLIBDIRS=-L/usr/X11R6/lib -L/usr/lib
SYSDEPLIBS=
endif

ifeq ($(SYS),solaris)
SYSDEPLIBS=-lsocket
endif


### If you don't have ranlib on your system (some SysV systems), then set
### this to /bin/true, or anything that ignores its arguments and does nothing
RANLIB=         ranlib

# ifeq ($(SYS),???)
# RANLIB=       /bin/true
# endif


##############################################################################
### End of options you should need to configure. You can safely ignore
### everything below here, although experts might want to change these
### definitions (used to compile all swarm code.)

### Shared Library Hack (Ho-Sheng Hsiao)
### These variables are for the library name
SHAREDNAME=Swarm
MAJORVER=1
MINORVER=0.0
SONAME=lib$(SHAREDNAME).so.$(MAJORVER)

### Swarm code is installed in these three places
LIBDIR=$(SWARMHOME)/lib
INCDIR=$(SWARMHOME)/include
BINDIR=$(SWARMHOME)/bin
OBJDIR=$(SWARMHOME)/obj

###
### In its simplest form, Swarm is compiled into a monolithic
### binary that encapsulates all of the tk/tcl and system files
### needed to link an application.
DISTOBJ=$(LIBDIR)/swarm.x

### These definitions are used for all compiles.
### You can override EXTRACFLAGS and EXTRALDFLAGS easily on the commandline
### Notes about specific flags:
###   -Wall is a good idea: it helps catch some easy errors.
###   -Wno-import turns off an annoying gcc feature
###   -O3 makes a big difference when running Swarm: when you get
###       serious, you want to build Swarm's libraries with optimization
###   -mv8 is a Sparc-specific optimization. On newer sparc chips, multiply
###        and divide (and hence, array access, random number generation, etc)
###        are about 30 times faster. (Old sparc chips will crash, however).
CC=             gcc
WARNFLAGS=      -Wall -Wno-import
# OPTFLAGS=     -g
OPTFLAGS=       -O2
# OPTFLAGS=     -mv8 -O3
# FOR SHARED LIBRARIES: you will need to add a -fPIC here during compilation
# of the libraries. Of course, you will want to take it out after you've 
# finished doing so.
EXTRACFLAGS=    
CFLAGS=         $(OPTFLAGS) $(WARNFLAGS) -I$(INCDIR) $(OTHERINCDIRS) 
$(EXTRACFLAGS)

### All Swarm apps are linked against SWARMLIBS, SYSLIBS, and OTHERLIBS
### in addition, application Makefiles should put extra Swarm libraries
### in APPLIBS. Currently, there is one library you might want in APPLIBS,
### "-lspace". There are also contributed libraries that could go here.
LINKER=         $(CC)
EXTRALDFLAGS=
MINLDFLAGS=     -L$(LIBDIR) $(OTHERLIBDIRS) $(EXTRALDFLAGS)
LDFLAGS=        -g $(MINLDFLAGS)

ifeq ($(SETUP),SFI)
SYSLIBS=        -ltclobjc -lBLT -ltk4.1 -ltcl7.5 -lXpm
else
SYSLIBS=        -ltclobjc -lBLT -ltk -ltcl -lXpm
endif


### Swarm can either be used in an "archive" configuration, where
### you link apps against an archive built from source, or a "bin" 
### configuration where you link apps against a distributed object
### that has most of the user library dependent routines already linked
### into it
ifeq ($(LDCONFIG),bin)
LIBS= $(DISTOBJ) -lobjc -lX11 -lm $(OTHERLIBS) $(SYSDEPLIBS)
else
SWARMLIBS=      -lanalysis -lsimtools -ltkobjc -lactivity -lrandom
-lswarmobject -lcollections -ldefobj
LIBS=           $(APPLIBS) $(SWARMLIBS) $(SYSLIBS) -lobjc -lX11 -lm
$(OTHERLIBS) $(SYSDEPLIBS)
endif

ifeq ($(LDCONFIG),shared)
SWARMLIBS=
LIBS=           $(APPLIBS) $(SYSLIBS) -lSwarm -lobjc -lX11 -lm
$(OTHERLIBS) $(SYSDEPLIBS)
endif

### Copy a header file into the installed place.
INSTALLHEADERS=cp -p

### Suffix rules for default compilation.
.SUFFIXES: .m .xm

.m.o:
        $(CC) -c $(CFLAGS) $<

### Rule to extract types, symbols, classes defined by a library module
.h.xm:
        @ CC=$(CC) CFLAGS="$(CFLAGS)" OBJECTS="$(OBJECTS)"
$(BINDIR)/make-h2x $@











reply via email to

[Prev in Thread] Current Thread [Next in Thread]