help-make
[Top][All Lists]
Advanced

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

Re: How can I avoid duplication of code in makefiles?


From: Dave Hylands
Subject: Re: How can I avoid duplication of code in makefiles?
Date: Fri, 12 Aug 2005 10:44:32 -0700

On 8/12/05, Paul D. Smith <address@hidden> wrote:
> Try putting the boilerplate stuff in another file and using "include".

Here's an example of what I use for my 8-bit AVR projects:

TARGET  = Simple-Servo
COMMON_OBJS = a2d_8.o Delay.o UART.o Hardware.o
include ../Rules.mk

If you want to view the Rules.mk file, you can find it over here:
<http://svn.rungie.com/websvn/filedetails.php?repname=Buildroot&path=%2Fbranches%2Fprojects%2Frobostix%2FRules.mk&rev=0&sc=0>

If you're prompted for a username/password, just use the word gumstix for both.

This particular Makefile assumes that $(TARGET).o will be a target as well.

-- 
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/




reply via email to

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