summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile35
1 files changed, 20 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index 04a36b3..2036ddc 100644
--- a/Makefile
+++ b/Makefile
@@ -1,26 +1,31 @@
1TARGET=usbmuxd 1TARGETS=usbmuxd iproxy testclient
2CFLAGS=-Wall 2CFLAGS=-Wall -g
3LDFLAGS=-lpthread -lusb -lrt 3LIBS=-lpthread -lusb -lrt
4LDFLAGS=
4 5
5objects = sock_stuff.o usbmuxd.o iphone.o 6all: $(TARGETS)
6 7
7all: $(TARGET) 8main.o: main.c usbmuxd.h sock_stuff.h iphone.h
9iphone.o: iproxy.c iphone.h usbmuxd.h sock_stuff.h
10sock_stuff.o: sock_stuff.c sock_stuff.h
11testclient.o: testclient.c sock_stuff.h
8 12
9%.o: %.c %.h 13%.o: %.c
10 $(CC) -o $@ $(CFLAGS) -c $< 14 $(CC) -o $@ $(CFLAGS) -c $<
11 15
12$(TARGET): $(objects) 16usbmuxd: main.o sock_stuff.o iphone.o
13 $(CC) -o $@ $(LDFLAGS) $^ 17 $(CC) -o $@ $(LDFLAGS) $^ $(LIBS)
18
19testclient: testclient.o sock_stuff.o
20 $(CC) -o $@ $(LDFLAGS) $^ $(LIBS)
21
22iproxy: iproxy.o sock_stuff.o
23 $(CC) -o $@ $(LDFLAGS) $^ $(LIBS)
14 24
15clean: 25clean:
16 rm -f *.o $(TARGET) 26 rm -f *.o $(TARGETS)
17 27
18realclean: clean 28realclean: clean
19 rm -f *~ 29 rm -f *~
20 30
21testclient: testclient.c sock_stuff.o 31.PHONY: all clean realclean
22 $(CC) $(LDFLAGS) -o testclient $(CFLAGS) $< sock_stuff.o
23
24iproxy: iproxy.c sock_stuff.o
25 $(CC) -lpthread -o iproxy $(CFLAGS) $< sock_stuff.o
26