Makefile: add Freebsd cflags/ldflags
This commit is contained in:
parent
eed4fd22c1
commit
497ee17345
16
Makefile
16
Makefile
@ -1,10 +1,22 @@
|
||||
CFILES=xcwd.c
|
||||
CC=gcc
|
||||
CFLAGS=-Wall -Werror -Wextra -pedantic -std=gnu99 -O2
|
||||
CFLAGS=-Wall -Werror -Wextra -std=gnu99 -O2
|
||||
LDFLAGS=-lX11
|
||||
EXE="xcwd"
|
||||
O=${CFILES:.c=.o}
|
||||
prefix=/usr/
|
||||
UNAME:=$(shell uname)
|
||||
O=${CFILES:.c=.o}
|
||||
|
||||
ifeq ($(UNAME), Linux)
|
||||
CFLAGS += -DLINUX
|
||||
else
|
||||
ifeq ($(UNAME), FreeBSD)
|
||||
CFLAGS += -I/usr/local/include/ -DFREEBSD
|
||||
LDFLAGS += -L/usr/local/lib -lprocstat
|
||||
else
|
||||
$(error Operating System not supported.)
|
||||
endif
|
||||
endif
|
||||
|
||||
${EXE}: clean ${O}
|
||||
${CC} -o $@ ${O} ${CFLAGS} ${LDFLAGS}
|
||||
|
Loading…
Reference in New Issue
Block a user