2015-03-23 20:30:06 +00:00
|
|
|
DEFINES=
|
|
|
|
CC?=gcc
|
|
|
|
CXX?=g++
|
|
|
|
LD?=g++
|
2016-04-03 21:14:11 +00:00
|
|
|
CFLAGS=-g -std=c99 -Wall $(DEFINES) `pkg-config --cflags libusb-1.0`
|
2015-03-23 20:30:06 +00:00
|
|
|
CXXFLAGS=-g -Wall $(DEFINES)
|
2016-04-03 21:14:11 +00:00
|
|
|
LDFLAGS=`pkg-config --libs libusb-1.0`
|
2015-03-23 20:30:06 +00:00
|
|
|
SRC=$(wildcard *.c)
|
|
|
|
SRCXX=$(wildcard *.cpp)
|
|
|
|
EXEC=$(SRC:.c=) $(SRCXX:.cpp=)
|
|
|
|
|
|
|
|
all: $(EXEC)
|
|
|
|
|
|
|
|
%: %.c
|
|
|
|
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
|
|
|
|
|
|
|
|
%: %.cpp
|
|
|
|
$(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -fr $(EXEC)
|