summaryrefslogtreecommitdiffstats
path: root/utils/hwstub/tools/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'utils/hwstub/tools/Makefile')
-rw-r--r--utils/hwstub/tools/Makefile22
1 files changed, 22 insertions, 0 deletions
diff --git a/utils/hwstub/tools/Makefile b/utils/hwstub/tools/Makefile
new file mode 100644
index 0000000000..3466a4e776
--- /dev/null
+++ b/utils/hwstub/tools/Makefile
@@ -0,0 +1,22 @@
+CC=gcc
+AR=ar
+HWEMUL_LIB_DIR=../lib
+CFLAGS=-W -Wall -O2 `pkg-config --cflags libusb-1.0` -std=c99 -g -I$(HWEMUL_LIB_DIR)
+LDFLAGS=`pkg-config --libs libusb-1.0` -lreadline
+EXEC=hwemul_tool
+HWEMUL_LIB=$(HWEMUL_LIB_DIR)/libhwemul.a
+SRC=$(wildcard *.c)
+OBJ=$(SRC:.c=.o)
+
+all: $(EXEC)
+
+%.o: %.c
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+hwemul_tool: hwemul_tool.o $(HWEMUL_LIB)
+ $(CC) -o $@ $^ $(LDFLAGS)
+
+clean:
+ rm -rf $(OBJ) $(LIB)
+
+