1
0
mirror of https://github.com/livingcomputermuseum/pdp7-unix.git synced 2026-02-23 07:43:00 +00:00
Files
livingcomputermuseum.pdp7-unix/build/os.mk
2016-03-25 13:24:07 -06:00

37 lines
425 B
Makefile

# detect OS
UNAME=$(shell uname)
ifeq ($(UNAME), Linux)
UNAME=LINUX
MAKE=make
else
ifeq ($(UNAME), Darwin)
UNAME=DARWIN
MAKE=make
else
ifeq ($(UNAME), FreeBSD)
UNAME=FREEBSD
MAKE=gmake
endif
endif
endif
# choose C compiler
ifeq ($(UNAME), LINUX)
# Linux
CC=gcc
else
ifeq ($(UNAME), FREEBSD)
# FreeBSD
CC=cc
else
ifeq ($(UNAME), DARWIN)
# Mac OS X
CC=cc
else
$(error "Unknown OS: " $(UNAME))
endif
endif
endif