| |
Burglar
Registered: Dec 2004 Posts: 1031 |
Cross Development using Makefile
Weekend didn't even start for most of you yet, but here it is ;)
Cross Development using Makefile
comments and improvements are of course very welcome.
enjoy and may your build times be short!
make -j16 |
|
... 37 posts hidden. Click here to view all posts.... |
| |
Burglar
Registered: Dec 2004 Posts: 1031 |
@Cruzer, great ;) if you run into any problems, gimme a shout.
@Hermit, using for loops like you are, you're just redoing everything
whenever you need to build. Also when it isn't needed.
Let me enhance your sng2swm building:
SNG2SWM=bin/sng2swm
SNGSRC=$(shell find ./sng-imports -name '*.sng')
SWMOBJ=$(SNGSRC:.sng=.swm.prg)
%.swm.prg: %.sng
$(SNG2SWM) $< $@
all: $(SWMOBJ)
clean:
rm -f $(SWMOBJ)
Now, "make all" will convert all .sng files to .swm.prg.
If you modify or add one, then that's the only one that will be converted
when you run "make all" again.
You can now also build in parallel.
The c1541 (thats what you use, cc1541 is a different tool by JackAsser)
issue is more complex as there is only one targetfile with multiple inputfiles.
So for now, I'll just advice to write it out in the Makefile.
Will save some headaches ;) |
| |
Dr.j
Registered: Feb 2003 Posts: 276 |
Hey There Burglar
I am a newcommer in Building shell commands to build files
and i didn't get into the bottom line of this thread.
sorry for the "pain-in-the ass" question:
where can i find this tool "MakeFile" ? didn't see any d/l . or is it a text file we edit ? i always used batch (MS) commands like "XXX.BAT"
and i got old one for compiling from Kickass and run in Winvice , can you show me Batch commands (MS) to
crunch with exomizer and to create/edit file with cc1541
with some info. about the commands ?
|
| |
Shine
Registered: Jul 2012 Posts: 327 |
Hi Alex,
maybe you looking for:
http://gnuwin32.sourceforge.net/packages/make.htm |
| |
Dr.j
Registered: Feb 2003 Posts: 276 |
Thanks Andy :-)
I gonna d/l it soon .
|
| |
chatGPZ
Registered: Dec 2001 Posts: 11114 |
dr.j has brought up an important point .... if you are stuck on windows for some reason, you need a "how to install and use cygwin" tutorial aswell, else even simple stuff like rm -f might not work correctly =)
(and dont even think about using make without a proper bash shell. yes it works for some simple stuff. BUT it will make your head explode once you get to the more advanced stuff, trust me) |
| |
JackAsser
Registered: Jun 2002 Posts: 1989 |
Quote: dr.j has brought up an important point .... if you are stuck on windows for some reason, you need a "how to install and use cygwin" tutorial aswell, else even simple stuff like rm -f might not work correctly =)
(and dont even think about using make without a proper bash shell. yes it works for some simple stuff. BUT it will make your head explode once you get to the more advanced stuff, trust me)
Actually you get quite far by installing nmake from microsoft and then unixtools for windows. But then again cygwin is a more general approach, pity the io-wrapper is so damn slow. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11114 |
"Actually you get quite far by installing nmake from microsoft and then unixtools for windows."
lets say you can make some things work. until you notice that some things only work halfway as intended. and then you will encounter something that doesnt work at all and install cygwin. =)
and ofcourse nmake works differently from gnu make. not to say it seriously sucks arse :) |
| |
JackAsser
Registered: Jun 2002 Posts: 1989 |
:P |
| |
Trap
Registered: Jul 2010 Posts: 222 |
Thank you Burglar for writing this.
Excellent stuff!!! |
| |
spider-j
Registered: Oct 2004 Posts: 445 |
Thanks for the rant, Burglar! I finally wrote my first Makefile \o/
But I've got the problem that make everytime builds everything from scratch; even when none of the source or dependencies files was changed (i.e. when I type 'make' two times in the shell like you wrote in the rant).
Here's my Makefile:
ASS=acme
ASSFLAGS=-v4
LIBPATH=/usr/share/acme/6502
LIBS=$(LIBPATH)/kernal.a $(LIBPATH)/static.a $(LIBPATH)/macros.a
PACKER=exomizer
PACKERFLAGS=sfx 2064 -n
BINARYDIR=../bin
OBJECTS=loader.prg rasters.prg
RM=rm -f
all: $(OBJECTS)
%.prg: %.asm $(LIBS)
$(ASS) $(ASSFLAGS) $<
$(PACKER) $(PACKERFLAGS) -o $(BINARYDIR)/$@ $@
$(RM) $@
loader.prg: loader.asm include/gemischt.prg include/randomtab2.prg
rasters.prg: rasters.asm include/ballsprites.spr include/border-empty-sprites.spr include/demotune01.c64.prg include/mydpetsciilogo.prg include/spider-logo-sprites.spr
clean:
$(RM) $(BINARYDIR)/*
|
Previous - 1 | 2 | 3 | 4 | 5 | 6 - Next |