saw an old makefile and couldn't help myself

This commit is contained in:
Ben Harris 2020-06-24 01:16:06 -04:00
parent 2ed22160a9
commit 1a1e1b6a18
1 changed files with 9 additions and 20 deletions

View File

@ -1,25 +1,14 @@
COMPILER_FLAGS = -O3 -Wall -std=c++11 -ggdb
LINKER_FLAGS = -lreadline
EXECUTABLE_NAME = bish
OBJS = \
bish.o \
parse.o \
util_fns.o
CPPFLAGS := -O3 -Wall -std=c++11 -ggdb
LINKER_FLAGS := -lreadline
EXECUTABLE_NAME := bish
all:
make bish
SRC_CC != find . -name '*.cc'
OBJS = $(SRC_CC:./%.cc=%.o)
bish: $(OBJS) Makefile
g++ $(OBJS) -o $(EXECUTABLE_NAME) $(LINKER_FLAGS)
all: bish
bish.o: bish.cc Makefile
g++ bish.cc -c -o bish.o $(COMPILER_FLAGS)
parse.o: parse.cc Makefile
g++ parse.cc -c -o parse.o $(COMPILER_FLAGS)
util_fns.o: util_fns.cc Makefile
g++ util_fns.cc -c -o util_fns.o $(COMPILER_FLAGS)
bish: $(OBJS)
$(CXX) $(OBJS) -o $(EXECUTABLE_NAME) $(LINKER_FLAGS)
clean:
$(RM) $(OBJS) $(EXECUTABLE_NAME); touch Makefile; make
$(RM) $(OBJS) $(EXECUTABLE_NAME)