-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·65 lines (52 loc) · 1.85 KB
/
Makefile
File metadata and controls
executable file
·65 lines (52 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
LINCC=gcc
WINCC=i586-mingw32msvc-gcc
# Fall back on the default gcc...
CC=$(LINCC)
CP=cp
RM=rm -rf
MKDIR=mkdir
CFLAGS=-std=gnu99 `pkg-config --cflags gtk+-2.0`
LFLAGS=`pkg-config --libs gtk+-2.0` -lzip -lssl -lplist
SRCDIR=src
RESDIR=res
SRCFILES=$(SRCDIR)/gtk-ipsw.c $(SRCDIR)/file.c $(SRCDIR)/ui.c $(SRCDIR)/decrypt_root_fs.c $(SRCDIR)/ipsw.c $(SRCDIR)/decrypt_img3.c $(SRCDIR)/xpwntool/abstractfile.c $(SRCDIR)/xpwntool/img3.c $(SRCDIR)/xpwntool/nor_files.c $(SRCDIR)/xpwntool/8900.c $(SRCDIR)/xpwntool/img2.c $(SRCDIR)/xpwntool/ibootim.c $(SRCDIR)/xpwntool/lzss.c $(SRCDIR)/xpwntool/lzssfile.c $(SRCDIR)/xpwntool/libxpwn.c
OBJFILES=$(subst .c,.o,$(SRCFILES))
MENUFILE=ipswTool.desktop
OUTFILE=firmextract
INSTPATH=/usr/bin
DATAPATH=/usr/share/ipswTool
all: tool
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
setccwin:
CC=$(WINCC)
windows: setccwin tool
tool: $(OBJFILES)
$(CC) -o $(OUTFILE) $(OBJFILES) $(LFLAGS)
gtk-builder-convert $(SRCDIR)/ui.glade $(RESDIR)/ui.xml
gtk-builder-convert $(SRCDIR)/about.glade $(RESDIR)/about.xml
@echo ""
@echo "Run 'make install' as root to install"
install:
@echo "Installing 1 file to "$(INSTPATH)"..."
$(CP) ./$(OUTFILE) $(INSTPATH)/$(OUTFILE)
@echo "Installing 4 files to "$(DATAPATH)"..."
$(RM) $(DATAPATH)
$(MKDIR) $(DATAPATH)
$(MKDIR) $(DATAPATH)/res $(DATAPATH)/data $(DATAPATH)/scripts
$(CP) ./res/* $(DATAPATH)/res
$(CP) ./data/* $(DATAPATH)/data
@echo "Adding "$(OUTFILE)" to the menu..."
cp $(MENUFILE) /usr/share/applications/$(MENUFILE)
@echo "Install complete"
@echo "To remove run 'make uninstall' as root"
uninstall:
@echo "Removing 1 file from "$(INSTPATH)"..."
$(RM) $(INSTPATH)/$(OUTFILE)
@echo "Removing 4 files from "$(DATAPATH)"..."
$(RM) $(DATAPATH)
@echo "Removing "$(OUTFILE)" from the menu..."
$(RM) /usr/share/applications/$(MENUFILE)
@echo "Uninstall complete"
clean:
$(RM) $(OUTFILE) $(OBJFILES)