2012-11-14 11:51:51 +00:00
|
|
|
CC=gcc
|
|
|
|
AR=ar
|
|
|
|
CFLAGS=-W -Wall -O2 `pkg-config --cflags libusb-1.0` -std=c99 -g -fPIC
|
|
|
|
LDFLAGS=`pkg-config --libs libusb-1.0` -fPIC
|
2013-06-13 00:02:53 +00:00
|
|
|
LIB=libhwstub.a
|
|
|
|
SRC=$(wildcard *.c)
|
2012-11-14 11:51:51 +00:00
|
|
|
OBJ=$(SRC:.c=.o)
|
|
|
|
|
2013-06-13 00:02:53 +00:00
|
|
|
all: $(LIB)
|
2012-11-14 11:51:51 +00:00
|
|
|
|
2013-06-13 00:02:53 +00:00
|
|
|
%.o: %.c
|
2012-11-14 11:51:51 +00:00
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
$(LIB): $(OBJ)
|
|
|
|
$(AR) rcs $@ $^
|
|
|
|
|
|
|
|
clean:
|
2013-06-13 00:02:53 +00:00
|
|
|
rm -rf $(OBJ) $(LIB)
|
2012-11-14 11:51:51 +00:00
|
|
|
|
|
|
|
|