diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2021-12-15 21:04:28 +0100 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2021-12-24 18:05:53 +0100 |
commit | c876d3bbefe0dc00c27ca0c12d29da5874946962 (patch) | |
tree | 69f468a185a369b01998314bc3ecc19b70f4fcaa /utils/e200rpatcher/Makefile | |
parent | 6c6f0757d7a902feb293be165d1490c42bc8e7ad (diff) | |
download | rockbox-c876d3bbefe0dc00c27ca0c12d29da5874946962.tar.gz rockbox-c876d3bbefe0dc00c27ca0c12d29da5874946962.zip |
rbutil: Merge rbutil with utils folder.
rbutil uses several components from the utils folder, and can be
considered part of utils too. Having it in a separate folder is an
arbitrary split that doesn't help anymore these days, so merge them.
This also allows other utils to easily use libtools.make without the
need to navigate to a different folder.
Change-Id: I3fc2f4de19e3e776553efb5dea5f779dfec0dc21
Diffstat (limited to 'utils/e200rpatcher/Makefile')
-rw-r--r-- | utils/e200rpatcher/Makefile | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/utils/e200rpatcher/Makefile b/utils/e200rpatcher/Makefile new file mode 100644 index 0000000000..dfe5c1e037 --- /dev/null +++ b/utils/e200rpatcher/Makefile | |||
@@ -0,0 +1,56 @@ | |||
1 | CFLAGS=-Wall -W | ||
2 | |||
3 | ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN) | ||
4 | OUTPUT=e200rpatcher.exe | ||
5 | CROSS= | ||
6 | CFLAGS+=-mno-cygwin | ||
7 | else | ||
8 | OUTPUT=e200rpatcher | ||
9 | CROSS=i586-mingw32msvc- | ||
10 | endif | ||
11 | |||
12 | LIBS = -lusb | ||
13 | WINLIBS = -I libusb-win32-device-bin-0.1.12.1/include libusb-win32-device-bin-0.1.12.1/lib/dynamic/libusb_dyn.c | ||
14 | |||
15 | NATIVECC = gcc | ||
16 | CC = $(CROSS)gcc | ||
17 | WINDRES = $(CROSS)windres | ||
18 | |||
19 | all: $(OUTPUT) | ||
20 | |||
21 | e200rpatcher: e200rpatcher.c bootimg.c | ||
22 | gcc $(CFLAGS) $(LIBS) -o e200rpatcher e200rpatcher.c bootimg.c | ||
23 | strip e200rpatcher | ||
24 | |||
25 | e200rpatcher.exe: e200rpatcher.c bootimg.c e200rpatcher-rc.o | ||
26 | $(CC) $(CFLAGS) $(WINLIBS) -o e200rpatcher.exe e200rpatcher.c bootimg.c e200rpatcher-rc.o | ||
27 | $(CROSS)strip e200rpatcher.exe | ||
28 | |||
29 | e200rpatcher-rc.o: e200rpatcher.rc e200rpatcher.manifest | ||
30 | $(WINDRES) -i e200rpatcher.rc -o e200rpatcher-rc.o | ||
31 | |||
32 | e200rpatcher-mac: e200rpatcher-i386 e200rpatcher-ppc | ||
33 | lipo -create e200rpatcher-ppc e200rpatcher-i386 -output e200rpatcher-mac | ||
34 | |||
35 | e200rpatcher.dmg: e200rpatcher-mac | ||
36 | mkdir -p e200rpatcher-dmg | ||
37 | cp -p e200rpatcher-mac e200rpatcher-dmg | ||
38 | hdiutil create -srcfolder e200rpatcher-dmg e200rpatcher.dmg | ||
39 | |||
40 | e200rpatcher-i386: e200rpatcher.c bootimg.c usb.h libusb-i386.a | ||
41 | gcc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -framework iokit -framework coreservices -arch i386 $(CFLAGS) -o e200rpatcher-i386 e200rpatcher.c bootimg.c -I. libusb-i386.a | ||
42 | strip e200rpatcher-i386 | ||
43 | |||
44 | e200rpatcher-ppc: e200rpatcher.c bootimg.c usb.h libusb-ppc.a | ||
45 | gcc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -framework iokit -framework coreservices -arch ppc $(CFLAGS) -o e200rpatcher-ppc e200rpatcher.c bootimg.c -I. libusb-ppc.a | ||
46 | strip e200rpatcher-ppc | ||
47 | |||
48 | bin2c: ../tools/bin2c.c | ||
49 | $(NATIVECC) $(CFLAGS) -o bin2c ../tools/bin2c.c | ||
50 | |||
51 | bootimg.c: bootloader.bin bin2c | ||
52 | ./bin2c bootloader.bin bootimg | ||
53 | |||
54 | clean: | ||
55 | rm -f e200rpatcher.exe e200rpatcher-mac e200rpatcher-i386 e200rpatcher-ppc e200rpatcher bin2c bootimg.c bootimg.h *~ e200rpatcher.dmg | ||
56 | rm -rf e200rpatcher-dmg | ||