summaryrefslogtreecommitdiffstats
path: root/utils/hwstub/tools/Makefile
blob: 3466a4e776fd99f4d45c07e0c812d056c40c88c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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)