summaryrefslogtreecommitdiffstats
path: root/utils/imxtools/hwemul/tools/Makefile
blob: 39f0c61c2ab3cd5ac324d8ebef33d5460ea7fe26 (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) $(LDFLAGS) -o $@ $^

clean:
	rm -rf $(OBJ) $(LIB)