Xref: news2.mv.net comp.os.msdos.djgpp:6758 From: alaric AT abwillms DOT demon DOT co DOT uk (Alaric B. Williams) Newsgroups: comp.os.msdos.djgpp Subject: Re: Makefile help.. Date: Wed, 31 Jul 1996 19:13:57 GMT Lines: 45 Message-ID: <838840326.11194.5@abwillms.demon.co.uk> References: <199607311119 DOT AA13175 AT mail DOT umu DOT se> NNTP-Posting-Host: abwillms.demon.co.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp ion2 AT freenet DOT hut DOT fi (Andreas Vernersson) wrote: >Hi! >I'd like little to know about makefiles.. um.. could someone show >an makefile-version of my compile bat file? >gcc -Wall -m486 -O3 vesa.c -o vesa.o >gcc -Wall -m486 -O3 gfx.c -o gfx.o >gcc -Wall -m486 -O3 test.c -o test.o >gcc -s vesa.o gfx.o test.o -o test.exe GCCOPTS = -Wall -m486 -O3 vesa.o : vesa.c gcc $(GCCOPTS) vesa.c -o vesa.o test.o : test.c gcc $(GCCOPTS) test.c -o test.o gfx.o : gfx.c gcc $(GCCOPTS) gfx.c -o gfx.o test.exe : vesa.o test.o gfx.o gcc -s vesa.o gfx.o test.o -o test.exe That is doable in a more concise way using implicit rules, but I like the control a rule for each module gives me - it's easy to add options to a single module etc. Regards, ABW >/Andreas Vernersson -- I have become... Comfortably numb... Alaric B. Williams Internet : alaric AT abwillms DOT demon DOT co DOT uk http://www.hardcafe.co.uk/Alaric/