delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/05/16:29:13

Date: Thu, 5 Jun 1997 16:27:28 -0400 (EDT)
From: "Art S. Kagel" <kagel AT ns1 DOT bloomberg DOT com>
To: SteelGolem <myork AT auracom DOT com>
Cc: djgpp AT delorie DOT com
Subject: Re: Make Info files confusing..
In-Reply-To: <5n69kf$2fe$3@thor.atcon.com>
Message-Id: <Pine.D-G.3.91.970605162241.6701K-100000@dg1>
Mime-Version: 1.0

On Wed, 4 Jun 1997, SteelGolem wrote:

> I can't understand how to make one (1) exe file out of many (multiple) c
> or cc files.. why does it have to be so complicated?? if ya can't show
> me that, at least show me how to make a library file (___.a),
> PLEASE!!?!?! (although both would be nice.. =P) 
> thanks for ANY help!!!  --email please!
> 

I assume from your Subject that you need a makefile for an app and a lib.
Here is a simple one:

Myapp.exe: mymodule1.o mymodule2.o mymodule3.o libmylib.a
	gcc -o Myapp.exe mymodule1.o mymodule2.o mymodule3.o -lmylib

libmylib.a: myutil1.o myutil2.o myutil3.o
	ar -rs libmylib.a $*

^^^^^^^^Make sure that each target command begins with a tab not spaces!

Art S. Kagel, kagel AT bloomberg DOT com


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019