2012-05-07 20:55:27 +00:00
|
|
|
ifndef HOST_OS
|
|
|
|
ifeq ($(OS),Windows_NT)
|
|
|
|
HOST_OS := Windows
|
|
|
|
else
|
|
|
|
HOST_OS := $(shell uname)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(HOST_OS),Windows)
|
|
|
|
SERIALDUMP = serialdump-windows
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(HOST_OS),Darwin)
|
|
|
|
SERIALDUMP = serialdump-macos
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef SERIALDUMP
|
|
|
|
# Assume Linux
|
|
|
|
SERIALDUMP = serialdump-linux
|
|
|
|
endif
|
|
|
|
|
|
|
|
all: $(SERIALDUMP)
|
|
|
|
|
2017-11-17 21:32:08 +00:00
|
|
|
CFLAGS += -Wall -Werror
|
|
|
|
|
2012-05-07 20:55:27 +00:00
|
|
|
$(SERIALDUMP): serialdump.c
|
2015-05-08 07:21:19 +00:00
|
|
|
$(CC) -O2 -o $@ $<
|
2017-11-17 21:32:47 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(SERIALDUMP)
|