show the skin buffer size as well as the used amount in the rockbox info screen
[kugel-rb.git] / rbutil / mkamsboot / Makefile
blob12058ecab876a48c42a0cffce115980010918554
1 # We use the UCL code available in the Rockbox tools/ directory
2 CFLAGS=-I../../tools/ucl/include -Wall
3 LIBUCL=../../tools/ucl/src/libucl.a
5 #change for releases
6 APPVERSION=`../../tools/version.sh`
8 ifndef V
9 SILENT = @
10 endif
12 ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
13 OUTPUT=mkamsboot.exe
14 CFLAGS+=-mno-cygwin
15 else
16 ifeq ($(findstring MINGW,$(shell uname)),MINGW)
17 OUTPUT=mkamsboot.exe
18 else
19 ifeq ($(findstring mingw,$(CC)),mingw)
20 OUTPUT=mkamsboot.exe
21 else
22 OUTPUT=mkamsboot
23 endif
24 endif
25 endif
27 CC?= gcc
29 ifdef RBARCH
30 CFLAGS += -arch $(RBARCH)
31 endif
33 OUT = build$(RBARCH)
35 all: $(OUTPUT)
37 $(LIBUCL):
38 make -C ../../tools/ucl/src libucl.a
40 # This file can be generated in the dualboot/ directory
41 $(OUT)/dualboot.o: dualboot.c
42 $(CC) $(CFLAGS) -c -o $(OUT)/dualboot.o dualboot.c
44 $(OUT)/md5.o: md5.c md5.h
45 $(CC) $(CFLAGS) -c -o $(OUT)/md5.o -W -Wall md5.c
47 $(OUT)/mkamsboot.o: mkamsboot.c dualboot.h md5.h
48 $(CC) $(CFLAGS) -c -o $(OUT)/mkamsboot.o -W -Wall mkamsboot.c -DVERSION=\"$(APPVERSION)\"
50 $(OUTPUT): $(OUT) $(OUT)/mkamsboot.o $(OUT)/md5.o $(OUT)/dualboot.o $(LIBUCL)
51 $(CC) $(CFLAGS) -o $(OUTPUT) $(OUT)/mkamsboot.o $(OUT)/md5.o $(OUT)/dualboot.o $(LIBUCL)
53 $(OUT)/libmkamsboot.o: mkamsboot.c dualboot.h md5.h
54 $(CC) $(CFLAGS) -DLIB -c -o $(OUT)/libmkamsboot.o -W -Wall mkamsboot.c
56 libmkamsboot$(RBARCH).a: $(OUT) $(OUT)/libmkamsboot.o $(OUT)/md5.o $(OUT)/dualboot.o
57 $(AR) ru libmkamsboot$(RBARCH).a $(OUT)/libmkamsboot.o $(OUT)/md5.o $(OUT)/dualboot.o
59 # some trickery to build ppc and i386 from a single call
60 ifeq ($(RBARCH),)
61 libmkamsbooti386.a:
62 make RBARCH=i386 libmkamsbooti386.a
64 libmkamsbootppc.a:
65 make RBARCH=ppc libmkamsbootppc.a
66 endif
68 libmkamsboot-universal: libmkamsbooti386.a libmkamsbootppc.a
69 @echo lipo libmkamsboot.a
70 $(SILENT) rm -f libmkamsboot.a
71 lipo -create libmkamsbootppc.a libmkamsbooti386.a -output libmkamsboot.a
73 clean:
74 rm -f $(OUTPUT) libmkamsboot.o libmkamsboot*.a
75 rm -rf build*
77 build$(RBARCH):
78 @echo MKDIR build$(RBARCH)
79 $(SILENT)mkdir build$(RBARCH)