-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
82 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
codepeiler | ||
*.sublime-workspace | ||
*.code | ||
bin/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
NAME = codepeiler | ||
LIBRARIES = Buffer | ||
LIBRARIES = Buffer Lexer Parser | ||
|
||
BINARIES = $(LIBARIES:%=lib%.a) $(NAME) | ||
BINPATHS = $(BINARIES:%=bin/%) | ||
SRCPATHS = $(LIBRARIES:%=src/lib%/) src/$(NAME)/ | ||
|
||
all: release | ||
|
||
.PHONY: release | ||
.PHONY: release debug clean | ||
release: | ||
$(foreach project, $(SRCPATHS), $(MAKE) -C $(project) release;) | ||
cp bin/$(NAME) . | ||
|
||
.PHONY: debug | ||
debug: | ||
$(foreach project, $(SRCPATHS), $(MAKE) -C $(project) release;) | ||
cp bin/$(NAME) . | ||
|
||
.PHONY: clean | ||
clean: | ||
$(foreach project, $(SRCPATHS), $(MAKE) -C $(project) clean;) | ||
$(foreach project, $(SRCPATHS), $(MAKE) -C $(project) clean;) | ||
rm -f $(NAME) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Generic makefile | ||
include ../common.mk | ||
ROOT = ../.. | ||
OUTDIR = $(ROOT)/$(BINDIR) | ||
OUTNAME= $(OUTDIR)/$(NAME) | ||
SRCS = $(wildcard *.cpp) | ||
OBJS = $(SRCS:.cpp=.o) | ||
DEPS = $(OBJS:.o=.d) | ||
|
||
release: | ||
$(MAKE) CXXFLAGS="$(RELEASEFLAGS)" $(OUTNAME) | ||
|
||
debug: | ||
$(MAKE) CXXFLAGS="$(DEBUGFLAGS)" $(OUTNAME) | ||
|
||
%.o: %.cpp | ||
$(CXX) $(CXXFLAGS) -c -o $@ $< | ||
|
||
$(OUTNAME): $(OBJS) | ||
$(CXX) $(CXXFLAGS) -o $@ $(OBJS) $(LIBS) | ||
|
||
.PHONY: clean | ||
clean: | ||
$(RM) $(OUTNAME) $(OBJS) $(DEPS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,6 @@ | ||
# Project config | ||
NAME = codepeiler | ||
LIBS = -lBuffer | ||
LIBS = -lBuffer -lLexer -lParser | ||
|
||
# Generic makefile | ||
include ../common.mk | ||
ROOT = ../.. | ||
OUTDIR = $(ROOT)/$(BINDIR) | ||
OUTNAME= $(OUTDIR)/$(NAME) | ||
SRCS = $(wildcard *.cpp) | ||
OBJS = $(SRCS:.cpp=.o) | ||
DEPS = $(OBJS:.o=.d) | ||
|
||
release: | ||
$(MAKE) CXXFLAGS="$(RELEASEFLAGS)" $(OUTNAME) | ||
|
||
debug: | ||
$(MAKE) CXXFLAGS="$(DEBUGFLAGS)" $(OUTNAME) | ||
|
||
%.o: %.cpp | ||
$(CXX) $(CXXFLAGS) -c -o $@ $< | ||
|
||
$(OUTNAME): $(OBJS) | ||
$(CXX) $(CXXFLAGS) -o $@ $(OBJS) $(LIBS) | ||
|
||
.PHONY: clean | ||
clean: | ||
$(RM) $(OUTNAME) $(OBJS) $(DEPS) | ||
# Include binary.mk | ||
include ../binary.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Project config | ||
NAME = Lexer | ||
LIBS = | ||
|
||
# Include library.mk | ||
include ../library.mk |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Project config | ||
NAME = Parser | ||
LIBS = -lLexer | ||
|
||
# Include library.mk | ||
include ../library.mk |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ | |
#endif | ||
|
||
#include "Parser.hpp" | ||
#include <iostream> | ||
|
||
Parser::Parser(Lexer *lexer) | ||
: lexer(lexer) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Generic library makefile | ||
include ../common.mk | ||
ROOT = ../.. | ||
OUTDIR = $(ROOT)/$(BINDIR) | ||
OUTNAME = $(OUTDIR)/lib$(NAME).a | ||
SRCS = $(wildcard *.cpp) | ||
OBJS = $(SRCS:.cpp=.o) | ||
DEPS = $(OBJS:.o=.d) | ||
|
||
release: | ||
$(MAKE) CXXFLAGS="$(RELEASEFLAGS)" $(OUTNAME) | ||
|
||
debug: | ||
$(MAKE) CXXFLAGS="$(DEBUGFLAGS)" $(OUTNAME) | ||
|
||
%.o: %.cpp | ||
$(CXX) $(CXXFLAGS) -c -o $@ $< | ||
|
||
$(OUTNAME): $(OBJS) | ||
ar rs $@ $(OBJS) | ||
|
||
.PHONY: clean | ||
clean: | ||
$(RM) $(OUTNAME) $(OBJS) $(DEPS) |