Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite emake makefile #1142

Merged
merged 1 commit into from Jan 14, 2018
Merged

Rewrite emake makefile #1142

merged 1 commit into from Jan 14, 2018

Conversation

JoshDreamland
Copy link
Member

No description provided.


CXXFLAGS := -I$(SRC_DIR) -I$(EXTRA_SRC_DIR) -Wall -Wextra -Wpedantic -g
LDFLAGS := $(OS_LIBS)
TEST_LIBS := -lgtest_main
Copy link
Contributor

@fundies fundies Jan 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we be linking gtest to enigma instead? I thought there would be a tests mode similar to debug / compile. That way users could run it from ide too.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually wrote this makefile for the test harness and then copied it over here. You're right—this line is no longer needed (it's not even used).

CXXFLAGS=-g -std=c++11 -c -Wall -I. -I../../CompilerSource
BINARY := ../../emake
SRC_DIR := .
OBJ_DIR := .eobjs

ifeq ($(OS),Windows_NT)
Copy link
Contributor

@fundies fundies Jan 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This if doesn't actually work I have a fix for it in my mac fix pr #1139 . I never set $OS anywhere and OS isn't actually Windows_NT in mingw's shell anymore

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Thanks; I've patched those changes in.


SOURCES=$(shell find . -name "*.cpp")
OBJECTS=$(addprefix .eobjs/,$(SOURCES:.cpp=.o))
EXECUTABLE=../../emake
Copy link
Contributor

@fundies fundies Jan 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaphs we should replace ../../ with an ENIGMA_ROOT var incase anyone ever tries to move this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the output binary and the "Extra sources" directory are the only direct uses of ../../, and the two uses are semantically entirely different, I think we should leave this as-is, for now.

@fundies
Copy link
Contributor

fundies commented Jan 13, 2018

Now, this is what I would call completly broken :P

EXTRA_SOURCES := ../../CompilerSource/settings-parse/eyaml.cpp ../../CompilerSource/compiler/event_reader/event_parser.cpp
EXTRA_SRC_DIR := ../../CompilerSource

CXXFLAGS := -I$(SRC_DIR) -I$(EXTRA_SRC_DIR) -Wall -Wextra -Wpedantic -g
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-std=c++11

@JoshDreamland JoshDreamland force-pushed the MakeEMake branch 3 times, most recently from c7cb5f3 to fe0c574 Compare January 14, 2018 02:09
@JoshDreamland JoshDreamland merged commit c6de5ec into master Jan 14, 2018
@RobertBColton
Copy link
Contributor

RobertBColton commented Jan 14, 2018

@JoshDreamland JoshDreamland deleted the MakeEMake branch April 22, 2018 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants