[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | Alpha Developer Support |
Notice: | [email protected], 800-332-4786 |
Moderator: | HYDRA::SYSTEM |
|
Created: | Mon Jun 06 1994 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 3722 |
Total number of notes: | 11359 |
3537.0. "base-Two Investment Systems, Inc." by HYDRA::AXPDEVELOPER (Alpha Developer support) Thu Apr 24 1997 04:40
Company Name : base-Two Investment Systems, Inc.
Contact Name : Nishan Krikorian
Phone : 617-395-8550
Fax :
Email : [email protected]
Date/Time in : 24-APR-1997 03:40:15
Entered by : Nick Hudson
SPE center : REO
Category : vms
OS Version :
System H/W :
Brief Description of Problem:
-----------------------------
From: SMTP%"[email protected]" 23-APR-1997 17:52:09.57
To: alpha-developer <[email protected]>
CC:
Subj: Translate Makefile to MMS file
Return-Path: [email protected]
Received: by asimov.mro.dec.com (UCX V4.1-12, OpenVMS V6.2 VAX);
Wed, 23 Apr 1997 17:52:07 -0400
Received: from pobox1.pa.dec.com by fluid.mro.dec.com (5.65v4.0/1.1.8.2/19Nov96-0448PM)
id AA16150; Wed, 23 Apr 1997 17:52:05 -0400
Received: by pobox1.pa.dec.com; id AA00404; Wed, 23 Apr 97 14:52:03 -0700
Received: by dashub1.das.dec.com with SMTP (Microsoft Exchange Server Internet Mail Connector Version 4.0.994.63)
id <[email protected]>; Wed, 23 Apr 1997 17:54:07 -0400
Received: from mail12.digital.com by pkohub1.athena.pko.dec.com with SMTP (Microsoft Exchange Internet Mail Connector Version 4.0.994.63)
id JJW0WWJF; Wed, 23 Apr 1997 17:53:58 -0400
Received: from mailrelay.tiac.net by mail12.digital.com (8.7.5/UNX 1.5/1.0/WV)
id RAA14293; Wed, 23 Apr 1997 17:48:20 -0400 (EDT)
Received: from basetwo.tiac (basetwo.tiac.net [206.119.210.232])
by mailrelay.tiac.net (8.8.5/) with SMTP id RAA25310
for <[email protected]>; Wed, 23 Apr 1997 17:48:34 -0400 (EDT)
Message-Id: <c=US%a=_%p=Digital%[email protected]>
From: "[email protected]" <[email protected]>
To: alpha-developer <[email protected]>
Subject: Translate Makefile to MMS file
Date: Wed, 23 Apr 1997 17:43:38 -0400
X-Mailer: Microsoft Exchange Server Internet Mail Connector Version 4.0.994.63
Encoding: 61 TEXT
I am trying to do a port from UNIX to VMS. I have a program written in
straightforward vanilla C. I've compiled it with a Makefile in AIX,
Solaris,
and Linux. I want to compile it in DECC, but I don't know how to
translate
the Makefile to an MMS file. I have the MMS documentation, but I'm
having
trouble getting started, especially with libraries. I boiled the big
Makefile down to a small example that contains most of the important
issues.
I've listed it below. I would very much appreciate it if you could
translate
that Makefile to an equivalent MMS file. Once I see how that's done, I
think
I could do the big one myself.
A short description of what it does. The files alpha.c, beta.c, gamma.c
are
compiled and put into a library lib1.a. Three programs are produced:
xxx from xxx.c
aaa from aaa.c with DAILY=0 and bbb.c
sss from aaa.c with DAILY=1 and bbb.c
All are linked with lib1.a. Everything depends upon the h-files eee.h,
fff.h, ggg.h.
Thanks very much.
Nish
Nishan Krikorian
base-Two Investment Systems, Inc.
Boston, MA
617-395-8550
ASAP Access Code: 120970
------------------------------------
LIB1 = \
lib1.a(alpha.o) \
lib1.a(beta.o) \
lib1.a(gamma.o)
CC = gcc
xxx: xxx.o $(LIB1)
${CC} -o xxx xxx.o lib1.a -lm
aaa: aaa.o bbb.o $(LIB1)
${CC} -o aaa aaa.o bbb.o lib1.a -lm
aaa.o: aaa.c
${CC} -c -O -DDAILY=0 aaa.c
sss: sss.o bbb.o $(LIB1)
${CC} -o sss sss.o bbb.o lib1.a -lm
sss.o: aaa.c
${CC} -c -O -DDAILY=1 -o sss.o aaa.c
HFILES = eee.h fff.h ggg.h
xxx.c aaa.o bbb.o sss.o $(LIB1): $(HFILES)
T.R | Title | User | Personal Name | Date | Lines |
---|
3537.1 | | KZIN::HUDSON | That's what I think | Fri Apr 25 1997 11:08 | 95 |
| From: DEC:.REO.REOVTX::HUDSON "[email protected] - UK Software
Partner Engineering 830-4121" 25-APR-1997 15:07:52.87
To: nm%vbormc::"[email protected]"
CC: HUDSON
Subj: RE: Translate Makefile to MMS file
Hello Nishan Krikorian
I think it's possible to do what you want. I hope I understood correctly; here
is the MMS file I came up with.
I haven't made much use of built in rules, so hopefully it is fairly clear
what's going on.
A couple of points:
The ".first" directive is needed because you want to make sure that "lib1.olb"
exists, otherwise the "library/replace" commands used to update the library
will fail.
I have to have a dependency in to make the whole library depend on all its
contents. This doesn't have any direct actions (just a comment as you see), but
it does mean that MMS then goes and does all the actions needed to make sure
the contents are OK.
Similarly, I put a dependency in at the top ("all"). This is so that by
default, MMS will build all the executables, although there's no direct action
that occurs from this (you just have to have a line of DCL there otherwise it
complains).
Let me know if you have questions or if I've misunderstood what you were trying
to do
Regards
Nick Hudson
Digital Software Partner Engineering
==============================================================================
CC = CC
HFILES = eee.h fff.h ggg.h
all : xxx.exe aaa.exe sss.exe
$ ! finished
.first
$ if f$search("lib1.olb") .eqs. "" then library/create/obj lib1.olb
alpha.obj : alpha.c $(HFILES)
$ $(CC) alpha.c /obj=$@
beta.obj : beta.c $(HFILES)
$ $(CC) beta.c /obj=$@
gamma.obj : gamma.c $(HFILES)
$ $(CC) gamma.c /obj=$@
lib1.olb : lib1.olb(alpha) lib1.olb(beta) lib1.olb(gamma)
$ ! dummy action to make sure all modules in lib1.olb are up to date
lib1.olb(alpha) : alpha.obj
$ library/replace lib1.olb alpha.obj
lib1.olb(beta) : beta.obj
$ library/replace lib1.olb beta.obj
lib1.olb(gamma) : gamma.obj
$ library/replace lib1.olb gamma.obj
xxx.obj : xxx.c $(HFILES)
$ $(CC) xxx.c /obj=$@
xxx.exe : xxx.obj lib1.olb
$ link/exe=$@ xxx.obj,lib1.olb/lib
aaa.exe : aaa.obj bbb.obj lib1.olb
$ link/exe=$@ aaa,bbb,lib1.olb/lib
sss.exe : sss.obj bbb.obj lib1.olb
$ link/exe=$@ sss,bbb,lib1.olb/lib
aaa.obj : aaa.c $(HFILES)
$ $(CC) aaa.c /obj=$@ /define="DAILY=0"
sss.obj : aaa.c $(HFILES)
$ $(CC) aaa.c /obj=$@ /define="DAILY=1"
bbb.obj : bbb.c
$ $(CC) bbb.c /obj=$@
==============================================================================
|