summaryrefslogtreecommitdiff
path: root/Makefile
blob: 594d5ee34780dc63915e683416d26f742a44e292 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
CFLAGS=-O2
CFLAGS+=-g -Wall -Werror
#
# Detect if we're on windows or linux:
#
ifeq ($(OS),Windows_NT)
	CC=g++
	CFLAGS+=
	LIBS+=-static-libgcc -lsetupapi
	EXE=.exe
else
	CC=gcc
	CFLAGS+=`pkg-config --cflags libudev`
	LIBS+=`pkg-config --libs libudev`
	EXE=
endif

all:
	${CC} ${CFLAGS} test/test.c libusbhp/libusbhp.c -o detect${EXE} ${LIBS}