Commit 5a4bc0b3 authored by Fabio Utzig's avatar Fabio Utzig
Browse files

Merge pull request #20 from AMDmi3/freebsd

Minor portability improvements
parents 050d0a6a f763ae3e
EXE := lm4flash
CC ?= gcc
CFLAGS := -Wall $(shell pkg-config --cflags libusb-1.0)
LDFLAGS := $(shell pkg-config --libs libusb-1.0)
......@@ -10,7 +12,7 @@ debug: CFLAGS += -g -DDEBUG
debug: $(EXE)
$(EXE): $(EXE).c
gcc $(CFLAGS) $^ $(LDFLAGS) -o $@
$(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@
clean:
rm -f *.o $(EXE)
......
......@@ -43,6 +43,12 @@ ifeq ($(shell uname),Darwin)
LDFLAGS += -framework AppKit -framework Carbon -framework IOKit
endif
ifeq ($(shell uname),FreeBSD)
LIBUSB_CFLAGS :=
LIBUSB_LIBDIR := /usr/lib
LIBUSB_LIBS := -lusb
endif
ifeq ($(shell uname),Linux)
LIBUSB_CFLAGS ?= $(shell pkg-config --cflags libusb-1.0)
LIBUSB_LIBDIR ?= $(shell pkg-config --variable=libdir libusb-1.0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment