Skip to content

Commit

Permalink
more progress to the build system, still doesn't build though
Browse files Browse the repository at this point in the history
  • Loading branch information
posixninja committed Nov 12, 2010
1 parent 99deb94 commit 4c132ff
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 61 deletions.
60 changes: 12 additions & 48 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,56 +1,20 @@
CC = gcc
AR = ar
CP = cp
ARMCC = arm-elf-gcc
ARMAS = arm-elf-as
OBJCOPY = arm-elf-objcopy
BIN2C = bin2c
ADDOBJ = ""
include common.mk

EXPLOITS_TARGET = exploits.a
EXPLOITS_DEPENDENCIES =
LIBPOIS0N_NAME = libpois0n
LIBPOIS0N_TARGETS = $(LIBPOIS0N_NAME)$(OS_STATIC_EXT) $(LIBPOIS0N_NAME)$(OS_SHARED_EXT)
LIBPOIS0N_DIRECTORY = syringe

POIS0N_TARGET = libpois0n.a
POIS0N_DEPENDENCIES = $(EXPLOITS_TARGET)
UTILITIES__TARGETS = injectpois0n$(OS_EXEC_EXT) tetheredboot$(OS_EXEC_EXT)

SYRINGE_TARGET = syringe
SYRINGE_DEPENDENCIES = $(POIS0N_TARGET)
TARGETS = $(LIBPOIS0N_TARGETS) $(UTILITIES_TARGETS)

TARGETS = $(EXPLOITS_TARGET) $(POIS0N_TARGET) $(SYRINGE_TARGET)
$(LIBPOIS0N_TARGETS):
$(MAKE) $(@) -C $(LIBPOIS0N_DIRECTORY)
$(CP) $(LIBPOIS0N_DIRECTORY)/$(@) $(@)

UNAME := $(shell uname -s)
ifeq ($(UNAME),Darwin)
CFLAGS = -I./include -I./resources -I/usr/local/include -I/opt/local/include
LDFLAGS = -L/usr/lib -L/opt/local/lib -lusb-1.0 -lcurl -lz -framework CoreFoundation -framework IOKit
ADDOBJ =
else
ifeq ($(UNAME),MINGW32_NT-5.1)
CFLAGS = -O3 -I./resources -DCURL_STATICLIB
LDFLAGS = -lcurl -lz
ADDOBJ = /mingw/lib/libcurl.a /mingw/lib/libwsock32.a /mingw/lib/libwldap32.a /mingw/lib/libpenwin32.a /mingw/lib/libz.a /mingw/lib/libsetupapi.a
else
CFLAGS = -O3 -I./resources -I./include
LDFLAGS = -lusb-1.0 -lcurl -lz
ADDOBJ =
endif
endif

$(EXPLOITS_TARGET):
$(MAKE) -C exploits

$(POIS0N_TARGET): $(POIS0N_OBJECTS)

$(SYRINGE_TARGET): $(SYRINGE_OBJECTS)
$(UTILITIES_TARGETS): $(LIBPOIS0N_TARGETS)

all: $(TARGETS)
make -C tools
make -C exploits
$(CC) $(CFLAGS) -c libpois0n.c libirecovery.c libpartial.c common.c
$(AR) rs libpois0n.a libpois0n.o libirecovery.o libpartial.o common.o exploits/exploits.a
$(CC) $(CFLAGS) $(LDFLAGS) -o injectpois0n injectpois0n.c libpois0n.a $(ADDOBJ)
$(CC) $(CFLAGS) $(LDFLAGS) -o tetheredboot tetheredboot.c libpois0n.a $(ADDOBJ)


clean:
make clean -C tools
make clean -C exploits
rm -rf *.o libpois0n.a injectpois0n tetheredboot
$(RM) $(TARGETS)
18 changes: 18 additions & 0 deletions common.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@


UNAME := $(shell uname -s)
ifeq ($(UNAME),Darwin)
OS_SHARED_EXT = .dylib
OS_STATIC_EXT = .a
OS_EXEC_EXT =
else
ifeq ($(UNAME),MINGW32_NT-5.1)
OS_SHARED_EXT = .dll
OS_STATIC_EXT = .a
OS_EXEC_EXT = .exe
else
OS_SHARED = .so
OS_STATIC_EXT = .a
OS_EXEC_EXT =
endif
endif
23 changes: 23 additions & 0 deletions syringe/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
include ../common.mk

EXPLOITS_NAME = exploits
EXPLOITS_TARGET = exploits.a
EXPLOITS_DIRECTORY = exploits

LIBPOIS0N_NAME = libpois0n
LIBPOIS0N_TARGET = $(LIBPOIS0N_NAME)$(OS_STATIC_EXT)
LIBPOIS0N_OBJECTS = $(EXPLOITS_TARGET)
LIBPOIS0N_DIRECTORY =

TARGETS = $(LIBPOIS0N_TARGET)

$(EXPLOITS_TARGET):
$(MAKE) -C $(EXPLOITS_DIRECTORY)
$(CP) $(EXPLOITS_DIRECTORY)/$(EXPLOITS_TARGET) .

$(LIBPOIS0N_TARGET): $(LIBPOIS0N_OBJECTS)

all: $(TARGETS)

clean:
$(RM) $(TARGETS)
23 changes: 10 additions & 13 deletions syringe/exploits/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
RM = rm -rf
EXPLOITS = limera1n steaks4uce
include ../../common.mk

EXPLOITS_TARGET = exploits.a
TARGETS = $(EXPLOITS_TARGET)

$(EXPLOITS):
$(MAKE) -C $(@)
_NAME =
_TARGET =
_OBJECTS =
_DIRECTORY =

$(EXPLOITS_TARGET): $(EXPLOITS)
TARGETS = $(_TARGET)

$(_TARGET): $(_OBJECTS)

all: $(TARGETS)

clean:
$(RM) $(TARGETS) *.o
for EXPLOIT in $(EXPLOITS);do \
make clean -C $$EXPLOIT; \
done; \
$(RM) $(TARGETS)

0 comments on commit 4c132ff

Please sign in to comment.