Commit 9d8964e0 authored by Pavel Tvrdík's avatar Pavel Tvrdík

Socktest: autorecognize OS in Makefile

parent 8223aa6a
CC=gcc
CFLAGS=-Wall -g -D LINUX
CC=cc
CFLAGS=-Wall -g
LDFLAGS=
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
CFLAGS += -D LINUX
endif
ifeq ($(UNAME_S),FreeBSD)
CFLAGS += -D BSD
endif
ifeq ($(UNAME_S),OpenBSD)
CFLAGS += -D BSD
endif
ifeq ($(UNAME_S),NetBSD)
CFLAGS += -D BSD
endif
HEADERS= common.h ipv4-linux.h ipv4-bsd.h ipv6.h
COMMANDS= rcv4 rcv6 snd4 snd6
......
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