-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (32 loc) · 809 Bytes
/
Makefile
File metadata and controls
43 lines (32 loc) · 809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#
# Makefile for lua-shell
#
# Copyright (c) 2015, Wing Eng
#
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S), Darwin)
CINCLUDES=-I/usr/include/lua5.1 -I/usr/local/include -I../linenoise
LIBS=-L/usr/local/lib -llua
endif
ifeq ($(UNAME_S), Linux)
CINCLUDES=-I/usr/include/lua5.1 -I../linenoise
LIBS=-L/usr/lib/x86_64-linux-gnu -llua5.1
endif
CFLAGS=-g -std=gnu99 ${CINCLUDES}
CXXFLAGS =-g -Wall -std=c++0x ${CINCLUDES}
OBJS = \
lua-shell.o \
lua-shell-completion.o \
parse-args.o \
spawn.o \
str-split.o
PROGS=lshell
all: ${PROGS}
@echo "done"
spawn: strlib.a spawn.cpp
${CXX} ${CXX_FLAGS} -D_TEST -o spawn spawn.cpp strlib.a
lshell: ${OBJS} ../linenoise/linenoise.a
${CXX} ${CXXFLAGS} -o lshell ${OBJS} ${LIBS} ../linenoise/linenoise.a
clean:
rm -f *.o *.a ${PROGS}
rm -rf *.dSYM