blob: 7c7a8d8ac9c98c125b0d620c8eb2facaf8c5f396 [file] [log] [blame]
adamdunkels2f5291c2003-04-09 12:55:06 +00001# Copyright (c) 2003, Adam Dunkels.
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions
6# are met:
7# 1. Redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer.
9# 2. Redistributions in binary form must reproduce the above copyright
10# notice, this list of conditions and the following disclaimer in the
11# documentation and/or other materials provided with the distribution.
12# 3. All advertising materials mentioning features or use of this software
13# must display the following acknowledgement:
14# This product includes software developed by Adam Dunkels.
15# 4. The name of the author may not be used to endorse or promote
16# products derived from this software without specific prior
17# written permission.
18#
19# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
20# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
23# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
25# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
27# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30#
31# This file is part of the Contiki desktop environment
32#
adamdunkels64207d42003-04-10 07:01:30 +000033# $Id: Makefile,v 1.3 2003/04/10 07:01:30 adamdunkels Exp $
adamdunkels2f5291c2003-04-09 12:55:06 +000034#
35
adamdunkels64207d42003-04-10 07:01:30 +000036all: hello.prg
adamdunkels2f5291c2003-04-09 12:55:06 +000037
38include Makefile.cfg
adamdunkels2f5291c2003-04-09 12:55:06 +000039
40CC=cc65
41AS=ca65
42LD=ld65
adamdunkels64207d42003-04-10 07:01:30 +000043CFLAGS=-I include -I include-$(SYS) -t $(SYS) --add-source -DWITH_LOADER_ARCH
adamdunkels2f5291c2003-04-09 12:55:06 +000044OPT=-Or
45
adamdunkels64207d42003-04-10 07:01:30 +000046%.prg: %.o $(SYS)/contiki-labels.o
47 cl65 --module -t $(SYS) -o $(SYS)/$@ $(SYS)/loader-arch-module.o $^
adamdunkels2f5291c2003-04-09 12:55:06 +000048
49%.o: %.c
50 $(CC) $(CFLAGS) $(OPT) -o $(patsubst %c, %s, $(notdir $<)) $<
51 $(AS) -o $@ $(AFLAGS) $(*).s
52
adamdunkels64207d42003-04-10 07:01:30 +000053#clean:
54# rm *.s *.o