forked from ps2dev/ps2client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
62 lines (47 loc) · 1.36 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
ifndef CC
CC = gcc
endif
CFLAGS = -std=gnu99 -Wall -pedantic -I/usr/include -I/usr/local/include
ifeq "x$(MSYSTEM)" "x"
LIBS = -lpthread
else
LIBS = -lwsock32 -lpthreadGC2
endif
ifeq "x$(PREFIX)" "x"
PREFIX = $(PS2DEV)
endif
all: bin/fsclient bin/ps2client
clean:
rm -f obj/*.o bin/*client*
install: bin/fsclient bin/ps2client
strip bin/*client*
@mkdir -p $(PREFIX)/bin
cp bin/*client* $(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/ps2link.o
obj/ps2link.o: src/ps2link.c src/ps2link.h
@mkdir -p obj
$(CC) $(CFLAGS) -c src/ps2link.c -o obj/ps2link.o
OFILES += obj/ps2netfs.o
obj/ps2netfs.o: src/ps2netfs.c src/ps2netfs.h
@mkdir -p obj
$(CC) $(CFLAGS) -c src/ps2netfs.c -o obj/ps2netfs.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
#####################
## CLIENT PROGRAMS ##
#####################
bin/fsclient: $(OFILES) src/fsclient.c
@mkdir -p bin
$(CC) $(CFLAGS) $(OFILES) src/fsclient.c -o bin/fsclient $(LIBS)
bin/ps2client: $(OFILES) src/ps2client.c
@mkdir -p bin
$(CC) $(CFLAGS) $(OFILES) src/ps2client.c -o bin/ps2client $(LIBS)