summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Paul Sladen2009-02-25 20:01:34 +0100
committerGravatar Nikias Bassen2009-02-25 20:01:34 +0100
commit523c44d0018c2e8480b37ac917aef7469b4b3a65 (patch)
tree981015afabe6df3574bb7ee06c82bd438b7f29fe /Makefile
parent6e2946da89ce8c44ac2b78e49c8fc934974d021d (diff)
downloadusbmuxd-523c44d0018c2e8480b37ac917aef7469b4b3a65.tar.gz
usbmuxd-523c44d0018c2e8480b37ac917aef7469b4b3a65.tar.bz2
A Readme, Makefile updates and cosmetic changes.
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 @@
-TARGET=usbmuxd
-CFLAGS=-Wall
-LDFLAGS=-lpthread -lusb -lrt
+TARGETS=usbmuxd iproxy testclient
+CFLAGS=-Wall -g
+LIBS=-lpthread -lusb -lrt
+LDFLAGS=
-objects = sock_stuff.o usbmuxd.o iphone.o
+all: $(TARGETS)
-all: $(TARGET)
+main.o: main.c usbmuxd.h sock_stuff.h iphone.h
+iphone.o: iproxy.c iphone.h usbmuxd.h sock_stuff.h
+sock_stuff.o: sock_stuff.c sock_stuff.h
+testclient.o: testclient.c sock_stuff.h
-%.o: %.c %.h
+%.o: %.c
$(CC) -o $@ $(CFLAGS) -c $<
-$(TARGET): $(objects)
- $(CC) -o $@ $(LDFLAGS) $^
+usbmuxd: main.o sock_stuff.o iphone.o
+ $(CC) -o $@ $(LDFLAGS) $^ $(LIBS)
+
+testclient: testclient.o sock_stuff.o
+ $(CC) -o $@ $(LDFLAGS) $^ $(LIBS)
+
+iproxy: iproxy.o sock_stuff.o
+ $(CC) -o $@ $(LDFLAGS) $^ $(LIBS)
clean:
- rm -f *.o $(TARGET)
+ rm -f *.o $(TARGETS)
realclean: clean
rm -f *~
-testclient: testclient.c sock_stuff.o
- $(CC) $(LDFLAGS) -o testclient $(CFLAGS) $< sock_stuff.o
-
-iproxy: iproxy.c sock_stuff.o
- $(CC) -lpthread -o iproxy $(CFLAGS) $< sock_stuff.o
-
+.PHONY: all clean realclean