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
6 APPVERSION
=`../../tools/version.sh`
12 ifeq ($(findstring CYGWIN
,$(shell uname
)),CYGWIN
)
16 ifeq ($(findstring MINGW
,$(shell uname
)),MINGW
)
19 ifeq ($(findstring mingw
,$(CC
)),mingw
)
30 CFLAGS
+= -arch
$(RBARCH
)
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
62 make RBARCH
=i386 libmkamsbooti386.a
65 make RBARCH
=ppc libmkamsbootppc.a
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
74 rm -f
$(OUTPUT
) libmkamsboot.o libmkamsboot
*.a
78 @echo MKDIR build
$(RBARCH
)
79 $(SILENT
)mkdir build
$(RBARCH
)