🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.programmer
Article #72

Re: MAKE Question - am I asking too much?

#72
From: Duane T. Mun
Date: Tue, 21 Jul 1992 18:38
44 lines
1709 bytes
In article <drt.711704826@brolga> drt@brolga.cc.uq.oz.au (David Taylor) writes:
> 
> We have a set of programs (C and C/SQL) being worked on by multiple
> programmers. Usually each program has a "main()" source file and
> several support modules with header files. These support modules are
> shared accross most of the programs.
> 
> All the source is stored on a common area and access is controlled 
> via RCS. I am trying to set up a common makefile that will:
> 
> - checkout any files that are needed to satisfy the make.

$(HDRS) $(SRCS):	# Check out sources and headers as needed
	co $@

This isn't a perfect answer, but it seems to work.  You might want to
try GNU Make, I think they have built in rules for RCS.

> - pre-compile the C/SQL files.
> - compile the C files

test.o: dclgen.h	# set up dependancies

.SUFFIXES: .c .sc	# define suffix rules

.c.o:			# how to make .o from .c
	$(CC) $(CFLAGS) -c $< $(INCDIRS)

.sc.o: 			# how to make .o from .sc
	$(CPP) -C -P $< > $*.cpp	# get dclgen stuff
	$(ESQLC) $*.cpp
	$(CC) $(CFLAGS) -c $*.c $(INCDIRS)
	rm -f $*.cpp $*.c

> - link the program.

test : $(OBJS)		# link
	$(LD) $(LDFLAGS) -o $@ $? $(LIBDIRS) $(LIBS)

If you want to see the entire makefile, let me know.

Hope this helps.

--
Technical Details
Message-ID: <Brr54t.DzE@scd.hp.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!mips!sdd.hp.com!hpscdc!mun
References: <drt.711704826@brolga>

Show Full Headers
Complete Article Headers
Newsgroups: comp.unix.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!mips!sdd.hp.com!hpscdc!mun
From: mun@corp.hp.com (Duane T. Mun)
Subject: Re: MAKE Question - am I asking too much?
Message-ID: <Brr54t.DzE@scd.hp.com>
Keywords: MAKE HELP 
Sender: news@scd.hp.com (News Account)
Organization: Hewlett-Packard
References: <drt.711704826@brolga>
Date: Tue, 21 Jul 1992 18:38:52 GMT
Lines: 44