1 # Makefile for uloader.o
3 # Copyright (C) 2006 Mihai Georgian <u-boot@linuxnotincluded.org.uk>
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License as
7 # published by the Free Software Foundation; either version 2 of
8 # the License, or (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21 # Makefile for loader.o by Chih-Chung Chang <jochang@gmail.com>
22 # CFLAGS taken from linux-2.4.17_mvl21-sandpoint
24 # To compile this module you will need a fully configured kernel
25 # 2.4.17_mvl21-sandpoint and gcc 2.95
27 # Change INCLUDE to match your environment
29 KERNEL=/rest/ppc/linux-2.4.21-pre4
31 INCLUDE = -nostdinc -I$(KERNEL)/include -I$(KERNEL)/arch/ppc
33 CFLAGS = -D__KERNEL__ -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -fsigned-char -msoft-float -pipe -ffixed-r2 -Wno-uninitialized -mmultiple -mstring -DMODULE
35 CC = $(CROSS_COMPILE)gcc
36 LD = $(CROSS_COMPILE)ld
38 uloader.o: uloader_mod.o uloader_boot.o
39 $(LD) -r uloader_mod.o uloader_boot.o -o uloader.o
40 uloader_mod.o: uloader_mod.c
41 $(CC) -c $(INCLUDE) $(CFLAGS) uloader_mod.c
42 uloader_boot.o: uloader_boot.S
43 $(CC) -c -mregnames uloader_boot.S
45 rm -f uloader.o uloader_mod.o uloader_boot.o