rockbox/rbutil/mkamsboot/Makefile
Rafaël Carré 96165abec2 FS#10253 : mkamsboot v1.0
- Bump version to 1.0
- Add Clipv2 target
- Make mkamsboot work as a library (work by domonoky : FS#10185, with a few modifications by me)
  . Use a macro with variadic arguments for error cases in functions which might error.
  . Add detailed descriptions to functions exported by the library (in the header file)
- modify bin2c.c to produce only one pair of .c/.h files with several files embedded in it
- move files needing to be built by an ARM cross compiler into dualboot/
- commit produced .c/.h files (containing nrv2e_d8.S and dualboot.S built for Clip, Fuze, e200v2, c200v2, m200v4, Clipv2)
- Write a real README file
- cosmetics: indent dualboot.S properly, remove trailing spaces, limit lines to 80 characters
- comments: add/correct comments in dualboot.S and mkamsboot.c
- move back extract_fw.c to utils/AMS/hacking

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21118 a1c6a512-1295-4272-9138-f99709370657
2009-05-28 18:27:08 +00:00

48 lines
1.2 KiB
Makefile

# We use the UCL code available in the Rockbox tools/ directory
CFLAGS=-I../../tools/ucl/include -Wall
LIBUCL=../../tools/ucl/src/libucl.a
ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
OUTPUT=mkamsboot.exe
CFLAGS+=-mno-cygwin
else
ifeq ($(findstring MINGW,$(shell uname)),MINGW)
OUTPUT=mkamsboot.exe
else
ifeq ($(findstring mingw,$(CC)),mingw)
OUTPUT=mkamsboot.exe
else
OUTPUT=mkamsboot
endif
endif
endif
CC?= gcc
all: $(OUTPUT)
$(LIBUCL):
make -C ../../tools/ucl/src libucl.a
# This file can be generated in the dualboot/ directory
dualboot.o: dualboot.c
$(CC) $(CFLAGS) -c -o dualboot.o dualboot.c
md5.o: md5.c md5.h
$(CC) $(CFLAGS) -c -o md5.o -W -Wall md5.c
mkamsboot.o: mkamsboot.c dualboot.h md5.h
$(CC) $(CFLAGS) -c -o mkamsboot.o -W -Wall mkamsboot.c
$(OUTPUT): mkamsboot.o md5.o dualboot.o $(LIBUCL)
$(CC) $(CFLAGS) -o $(OUTPUT) mkamsboot.o md5.o dualboot.o $(LIBUCL)
libmkamsboot.o: mkamsboot.c dualboot.h md5.h
$(CC) $(CFLAGS) -DLIB -c -o libmkamsboot.o -W -Wall mkamsboot.c
libmkamsboot.a: libmkamsboot.o md5.o dualboot.o
$(AR) ruv libmkamsboot.a libmkamsboot.o md5.o dualboot.o
clean:
rm -f $(OUTPUT) mkamsboot.o *~ md5.o dualboot.o \
libmkamsboot.o libmkamsboot.a