www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Makefile Syntax

reply Oliver Kania <Oliver_member pathlink.com> writes:
What is the Syntax of makefiles in D ??
I bet similiar as in C++ but I would really like to c some examples
or a tutorial
regards, Oliver Kania
Nov 20 2004
parent reply "Valéry Croizier" <valery freesurf.fr> writes:
"Oliver Kania" <Oliver_member pathlink.com> a écrit dans le message de news:
cnoepb$1s8p$1 digitaldaemon.com...
 What is the Syntax of makefiles in D ??
 I bet similiar as in C++ but I would really like to c some examples
 or a tutorial
For exemple, for an OpenGL demo that displays flying birds, with files demo.d and birds.d : MAIN=demo OBJS=birds.obj LIBS=opengl32.lib glu32.lib glut32.lib DFLAGS=-g DC=c:\dmd\bin\dmd $(MAIN).exe: $(MAIN).obj $(OBJS) $(DC) $(MAIN).obj $(OBJS) $(LIBS) .d.obj: $(DC) $(DFLAGS) -c $< all: $(MAIN).exe test: $(MAIN).exe clean: del *.obj *.map In my editor (SciTE) I bind the 'build' command to 'make' and the 'go' command to 'make run'.
Nov 20 2004
next sibling parent reply Oliver Kania <Oliver_member pathlink.com> writes:
Thx Valery !
I have more questions concerning the environment varialbles and will start a new
thread 4 this. Is there an official makefile documentation ?
Regards, Oliver


In article <cnogl4$1v89$1 digitaldaemon.com>, Valéry Croizier says...
"Oliver Kania" <Oliver_member pathlink.com> a écrit dans le message de news:
cnoepb$1s8p$1 digitaldaemon.com...
 What is the Syntax of makefiles in D ??
 I bet similiar as in C++ but I would really like to c some examples
 or a tutorial
For exemple, for an OpenGL demo that displays flying birds, with files demo.d and birds.d : MAIN=demo OBJS=birds.obj LIBS=opengl32.lib glu32.lib glut32.lib DFLAGS=-g DC=c:\dmd\bin\dmd $(MAIN).exe: $(MAIN).obj $(OBJS) $(DC) $(MAIN).obj $(OBJS) $(LIBS) .d.obj: $(DC) $(DFLAGS) -c $< all: $(MAIN).exe test: $(MAIN).exe clean: del *.obj *.map In my editor (SciTE) I bind the 'build' command to 'make' and the 'go' command to 'make run'.
Nov 20 2004
parent reply J C Calvarese <jcc7 cox.net> writes:
Oliver Kania wrote:
 Is there an official makefile documentation ?
You mean this? http://www.digitalmars.com/ctg/make.html -- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/
Nov 20 2004
parent Sai <Sai_member pathlink.com> writes:
I see that the DMD make is limited in capabilities when compared to
gnu make. For some advanced commands, I use following win32 port of
gnu make. Its pretty powerful, I like it.

http://unxutils.sourceforge.net/

Good luck
Sai
Nov 21 2004
prev sibling parent Oliver Kania <Oliver_member pathlink.com> writes:
Hi !
Looking closer I do not understand the following passage :
.d.obj:
    $(DC) $(DFLAGS) -c $<
Is this a general rule to make Objects ? Where are the names of the sourcefiles ? (I have some esp. with C++ makefiles under Linux but this seems different) Regards, Oliver In article <cnogl4$1v89$1 digitaldaemon.com>, Valéry Croizier says...
"Oliver Kania" <Oliver_member pathlink.com> a écrit dans le message de news:
cnoepb$1s8p$1 digitaldaemon.com...
 What is the Syntax of makefiles in D ??
 I bet similiar as in C++ but I would really like to c some examples
 or a tutorial
For exemple, for an OpenGL demo that displays flying birds, with files demo.d and birds.d : MAIN=demo OBJS=birds.obj LIBS=opengl32.lib glu32.lib glut32.lib DFLAGS=-g DC=c:\dmd\bin\dmd $(MAIN).exe: $(MAIN).obj $(OBJS) $(DC) $(MAIN).obj $(OBJS) $(LIBS) .d.obj: $(DC) $(DFLAGS) -c $< all: $(MAIN).exe test: $(MAIN).exe clean: del *.obj *.map In my editor (SciTE) I bind the 'build' command to 'make' and the 'go' command to 'make run'.
Nov 20 2004