Commit 61d3ee81 authored by Joseph Pallamidessi's avatar Joseph Pallamidessi

Compilation now (more) platform independent, as it will compile out of the box...

Compilation now (more) platform independent, as it will compile out of the box with clang on OSX. You can change the compiler used with export=compiler_name before make
parent 2d9bbe61
......@@ -4,14 +4,13 @@ ifeq ($(shell uname -o 2>/dev/null),Msys)
endif
EXEC = bin/easea
CPPFLAGS += -DUNIX_OS -Ialexyacc/include/ -g -Wno-deprecated -DDEBUG -DLINE_NUM_EZ_FILE
CPPC = g++
LDFLAGS =
OBJ= build/EaseaSym.o build/EaseaParse.o build/EaseaLex.o alexyacc/libalex.a build/EaseaYTools.o boost/program_options.a libeasea/libeasea.a
#ifeq ($(UNAME),Darwin)
$(EXEC):build bin $(OBJ)
$(CPPC) $(CPPFLAGS) $(LDFLAGS) $(OBJ) -o $@
$(CXX) $(CPPFLAGS) $(LDFLAGS) $(OBJ) -o $@
ifneq ("$(OS)","")
@echo #
@echo # Congratulations ! It looks like you compiled EASEA successfully.
......@@ -65,11 +64,11 @@ endif
endif
# $(EXEC):EaseaSym.o EaseaParse.o EaseaLex.o alexyacc/libalex.so
# $(CPPC) $(CPPFLAGS) $(LDFLAGS) $^ -o $@
# $(CXX) $(CPPFLAGS) $(LDFLAGS) $^ -o $@
# $(EXEC)_bin:EaseaSym.o EaseaParse.o EaseaLex.o
# $(CPPC) $(CPPFLAGS) $(LDFLAGS) $^ -o $@ -lalex
# $(CXX) $(CPPFLAGS) $(LDFLAGS) $^ -o $@ -lalex
install:vars
......@@ -112,13 +111,13 @@ endif
build/EaseaParse.o: EaseaParse.cpp EaseaLex.cpp
$(CPPC) $(CPPFLAGS) $< -o $@ -c -w
$(CXX) $(CPPFLAGS) $< -o $@ -c -w
build/EaseaLex.o: EaseaLex.cpp
$(CPPC) $(CPPFLAGS) $< -o $@ -c -w
$(CXX) $(CPPFLAGS) $< -o $@ -c -w
build/%.o:%.cpp
$(CPPC) $(CPPFLAGS) -c -o $@ $<
$(CXX) $(CPPFLAGS) -c -o $@ $<
#compile library for alex and ayacc unix version
alexyacc/libalex.so:alexyacc/*.cpp
......
......@@ -7,7 +7,6 @@ yycsssiz.o yycstsiz.o yycsusiz.o yycsyner.o yyctoflw.o yycuncin.o \
yycunput.o yycuoflw.o yycwipe.o yycwork.o yycwrap.o
CPPC = g++
CPPFLAGS = -Iinclude/
LIB_NAME=libalex.so
STATIC_LIB_NAME = libalex.a
......@@ -17,10 +16,10 @@ $(STATIC_LIB_NAME): $(OBJS)
$(LIB_NAME): $(OBJS)
$(CPPC) -shared -o $@ $^
$(CXX) -shared -o $@ $^
%.o:%.cpp
$(CPPC) $(CPPFLAGS) -fpic -c $<
$(CXX) $(CPPFLAGS) -fpic -c $<
clean:
rm -f *.o $(LIB_NAME) $(STATIC_LIB_NAME)
\ No newline at end of file
rm -f *.o $(LIB_NAME) $(STATIC_LIB_NAME)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment