Update Makefile for linenoise.

This commit is contained in:
Jason S. Ninneman 2017-06-07 18:37:30 -07:00
parent 1b6a10e097
commit 41265e020c

View file

@ -3,14 +3,14 @@
VERS=1.0 VERS=1.0
CC?=gcc CC?=gcc
CCFLAGS+=-std=c99 CCFLAGS+=-std=c99 -D _DEFAULT_SOURCE
LIBS= LIBS=
UNAME_S := $(shell uname -s) UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux) ifeq ($(UNAME_S),Linux)
LIBS=-lrt LIBS=-lrt
endif endif
OBJS=main.o init.o actions1.o actions2.o score.o misc.o OBJS=main.o init.o actions1.o actions2.o score.o misc.o linenoise.o
SOURCES=$(OBJS:.o=.c) dungeon.c advent.h funcs.h sizes.h adventure.text Makefile control SOURCES=$(OBJS:.o=.c) dungeon.c advent.h funcs.h sizes.h adventure.text Makefile control
.c.o: .c.o:
@ -37,6 +37,9 @@ database.o: database.c database.h sizes.h
database.c database.h: dungeon database.c database.h: dungeon
./dungeon ./dungeon
linenoise.o: linenoise/linenoise.h
$(CC) $(CCFLAGS) $(DBX) -c linenoise/linenoise.c
dungeon: dungeon.c dungeon: dungeon.c
$(CC) $(CCFLAGS) -o $@ $< $(CC) $(CCFLAGS) -o $@ $<