delorie.com/archives/browse.cgi | search |
From: | Damian Yerrick <Bullcr_pd_yerrick AT hotmail DOT comRemoveBullcr_p> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Generic makefile! (Re: Reverse-compiler) |
Organization: | Pin Eight Software http://pineight.8m.com/ |
Message-ID: | <krflesoh3bp0b7p47ss14ki2rce8cp245a@4ax.com> |
References: | <8c3eae$j1l$1 AT news6 DOT svr DOT pol DOT co DOT uk> <8c457a$162$1 AT news7 DOT svr DOT pol DOT co DOT uk> <8caj5q$ii3$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <8cb2cm$t25$1 AT news6 DOT svr DOT pol DOT co DOT uk> |
X-Newsreader: | Forte Agent 1.7/32.534 |
MIME-Version: | 1.0 |
Lines: | 58 |
X-Trace: | +4oQ4FippxexieWnagq0M5oUpBMBQPPJPRcqeAJVI2lzJue01epVL5799i2tYIuVh0icX3Cfit7c!L8DKH9+yiea5yDWBtlPs6rQNrKlJXqjxUXztXpiGt4J2dWwSSQoAa0PYqQKCloZP0XsfjIqyu8S6!3DA= |
X-Complaints-To: | abuse AT gte DOT net |
X-Abuse-Info: | Please be sure to forward a copy of ALL headers |
X-Abuse-Info: | Otherwise we will be unable to process your complaint properly |
NNTP-Posting-Date: | Wed, 05 Apr 2000 04:39:36 GMT |
Distribution: | world |
Date: | Wed, 05 Apr 2000 04:39:36 GMT |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
On Mon, 3 Apr 2000 22:26:30 +0100, "Ben Davis" <ben AT vjpoole DOT freeserve DOT co DOT uk> wrote: >and written a batch file (I can't be bothered to read the >MAKE documentation) which creates the header as necessary and >then compiles the program. I seem to have got it right this time. At first, when I moved to Linux, I did the same thing; I used shell scripts (the equivalent of batch files) to script my compiles. But then I found Shawn Hargreaves's `speed' game, which came with a simple makefile: http://www.talula.demon.co.uk/speed/ Makefiles are quite simple. Here's a generic GNU makefile; change what you need: ######################### 8< ######################### #insert your executable's name here EXENAME = drm.exe #insert the basenames of all your C files here #(separated by spaces) OBJ = drm OBJS = $(addsuffix .o,$(OBJ)) #compiler and linker flags go here CFLAGS = -Wall -m486 -O3 -ffast-math LFLAGS = #insert the names of all libraries used in your program #(separated by spaces) LIBS = -lalleg #insert the names of all headers used in your program #(separated by spaces) HEADS = drm.h #dependency list follows #the big space before a command is a tab (Ctrl+I); dumb stupid #GNU make doesn't recognize initial spaces so don't use Edit.com drm: $(OBJS) gcc $(LFLAGS) -o $(EXENAME) $(OBJS) $(LIBS) %.o: %.c $(HEADS) gcc $(CFLAGS) -o $@ -c $< ######################### 8< ######################### -- Damian Yerrick "I refuse to listen to those who refuse to listen to reason." See the whole sig: http://www.rose-hulman.edu/~yerricde/sig.html This is McAfee VirusScan. Add these two lines to your signature to prevent the spread of signature viruses. http://www.mcafee.com/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |