forked from orbisdev/ps4sh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
69 lines (50 loc) · 1.59 KB
/
Makefile
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
66
67
68
69
CC = gcc
CFLAGS = -std=gnu99 -Wall -pedantic -I/usr/local/opt/readline/include -I/usr/include -I/usr/local/include -I/opt/local/include
ifeq "x$(MSYSTEM)" "x"
LIBS = -lreadline -L/usr/local/opt/readline/lib -L/opt/local/lib -lpthread -lcurses -lncurses
#TODO WINDOWS SUPPORT
else
LIBS = -lwsock32 -lpthreadGC2
endif
ifeq "x$(PREFIX)" "x"
PREFIX = $(PS4SDK)
endif
all: bin/ps4sh
clean:
rm -f obj/*.o bin/*ps4sh*
install: bin/ps4sh
strip bin/*ps4sh*
cp bin/*ps4sh* $(PREFIX)/bin
####################
## CLIENT MODULES ##
####################
OFILES += obj/network.o
obj/network.o: src/network.c src/network.h
@mkdir -p obj
$(CC) $(CFLAGS) -c src/network.c -o obj/network.o
OFILES += obj/ps4link.o
obj/ps4link.o: src/ps4link.c src/ps4link.h
@mkdir -p obj
$(CC) $(CFLAGS) -c src/ps4link.c -o obj/ps4link.o
OFILES += obj/utility.o
obj/utility.o: src/utility.c src/utility.h
@mkdir -p obj
$(CC) $(CFLAGS) -c src/utility.c -o obj/utility.o
OFILES += obj/rl_common.o
obj/rl_common.o: src/rl_common.c src/rl_common.h
@mkdir -p obj
$(CC) $(CFLAGS) -c src/rl_common.c -o obj/rl_common.o
OFILES += obj/common.o
obj/common.o: src/common.c src/common.h
@mkdir -p obj
$(CC) $(CFLAGS) -c src/common.c -o obj/common.o
OFILES += obj/debugnet.o
obj/debugnet.o: src/debugnet.c src/debugnet.h
@mkdir -p obj
$(CC) $(CFLAGS) -c src/debugnet.c -o obj/debugnet.o
#####################
## CLIENT PROGRAMS ##
#####################
bin/ps4sh: $(OFILES) src/ps4sh.c src/ps4sh.h
@mkdir -p bin
$(CC) $(CFLAGS) $(OFILES) src/ps4sh.c -o bin/ps4sh $(LIBS)