diff Makefile @ 1:05cc06e88a57

modified to make use of libhid to access the device
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Fri, 24 Dec 2010 15:28:04 +0900
parents e1a1a181c0d7
children b16b82dbfe87
line wrap: on
line diff
--- a/Makefile	Thu Dec 16 20:30:11 2010 +0900
+++ b/Makefile	Fri Dec 24 15:28:04 2010 +0900
@@ -2,12 +2,17 @@
 
 TARGET = rcctl
 SRCS = rcctl.c cdcnv.c
+OBJS = rcctl.o cdcnv.o
 CC = gcc
-CCOPT = -O -lusb -Wall
 
-all:
-	$(CC) $(CCOPT) -o $(TARGET) $(SRCS)
+# for debug build
+CFLAGS = -O -Wall -g -DVERBOSE -DDEBUG -I/usr/include/libusb-1.0
+# for release build
+#CFLAGS = -O -Wall
+LDFLAGS = -lhid -lusb
 
-debug:
-	$(CC) $(CCOPT) -DVERBOSE -DDEBUG -o $(TARGET) $(SRCS)
+all: $(OBJS)
+	$(CC) -o $(TARGET) $(OBJS) $(LDFLAGS)
 
+clean:
+	rm -f *.o $(TARGET)