Re: [cc65] Best makefile utility ?

From: MagerValp <MagerValp1cling.gu.se>
Date: 2004-10-23 12:18:11
>>>>> "j" == jlsfjs  <jlsfjs@yahoo.fr> writes:

j> Hello, I would like to know what kind of makefile utility is best
j> suitable for small projects with cc65 under linux ? Of course, gnu
j> make is here but it's really too complex for me (at least I would
j> like to avoid spending hours to learn how to setup a small
j> makefile) Nothing easier ?

No make utility is "easier" than any other, they all parse the same
files. GNU make is probably the best choice these days.

j> For now, I just compile everything everytime (12 files) and it's
j> soo fast that I wonder if I really need to use a makefile...

Here's the Makefile I use for new cc65 projects:

----------------------------------------------------------------------

TARGET=c64
CC=cl65
AS=ca65
LD=cl65
CFLAGS=-Oirs -t $(TARGET)
AFLAGS=
LDFLAGS=-t $(TARGET)

%.o: %.c
	$(CC) -c $(CFLAGS) $<

%.o: %.s
	$(AS) $(AFLAGS) $<


all: myprogram.prg


OBJS = \
	main.o \
	gfx.o \
	map.o


myprogram.prg: $(OBJS)
	$(LD) $(LDFLAGS) -m myprogram.map -o myprogram.prg $^


clean:
	rm -f *.o
	rm -f myprogram.prg myprogram.map


distclean: clean
	rm -f *~

----------------------------------------------------------------------

Just change the program name and add your files to OBJS.

-- 
    ___          .     .  .         .       . +  .         .      o   
  _|___|_   +   .  +     .     +         .  Per Olofsson, arkadspelare
    o-o    .      .     .   o         +          MagerValp@cling.gu.se
     -       +            +    .     http://www.cling.gu.se/~cl3polof/
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sat Oct 23 12:18:14 2004

This archive was generated by hypermail 2.1.8 : 2004-10-23 12:18:23 CEST