home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.programmer
- Path: 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
-
- 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.
-
- --
-