Skip to content
Snippets Groups Projects
Unverified Commit 3d1ba2aa authored by Leon Dietrich's avatar Leon Dietrich
Browse files
[AUTOMERGE]
parents 4f490609 5d6a85ca
No related branches found
No related tags found
No related merge requests found
...@@ -41,15 +41,16 @@ MAKEFLAGS += --no-builtin-rules ...@@ -41,15 +41,16 @@ MAKEFLAGS += --no-builtin-rules
.PHONY: all clean .PHONY: all clean
all: ${TARGETS} all: ${TARGETS}
${BINDIR}/%: $(patsubst ${SRCDIR}/%,${OBJDIR}/%,${APPDIR})/%.o ${OBJECTS} ${BINDIR}/%: $(patsubst ${SRCDIR}/%,${OBJDIR}/%,${APPDIR})/%.o ${OBJECTS} Makefile ${APPDIR}/%.ldflags
${MKDIR} ${@D} && ${CXX} ${CXXFLAGS} ${LFLAGS} -o $@ $< ${OBJECTS} $(shell [ -r $(patsubst ${OBJDIR}/%.o,${SRCDIR}/%.ldflags,$<) ] && cat $(patsubst ${OBJDIR}/%.o,${SRCDIR}/%.ldflags,$<) ) && touch $@ ${MKDIR} ${@D} && ${CXX} ${CXXFLAGS} ${LFLAGS} -o $@ $< ${OBJECTS} $(shell [ -r $(patsubst ${OBJDIR}/%.o,${SRCDIR}/%.ldflags,$<) ] && cat $(patsubst ${OBJDIR}/%.o,${SRCDIR}/%.ldflags,$<) ) && touch $@
${OBJDIR}/%.o: ${SRCDIR}/%.cpp ${DEPDIR}/%.d ${OBJDIR}/%.o: ${SRCDIR}/%.cpp ${DEPDIR}/%.d Makefile
${MKDIR} ${@D} && ${MKDIR} $(patsubst ${OBJDIR}/%,${DEPDIR}/%,${@D}) && ${CXX} ${CXXFLAGS} ${DEPFLAGS} ${LFLAGS} -o $@ -c $< && touch $@ ${MKDIR} ${@D} && ${MKDIR} $(patsubst ${OBJDIR}/%,${DEPDIR}/%,${@D}) && ${CXX} ${CXXFLAGS} ${DEPFLAGS} ${LFLAGS} -o $@ -c $< && touch $@
${OBJDIR}/%.o: ${SRCDIR}/%.c ${DEPDIR}/%.d ${OBJDIR}/%.o: ${SRCDIR}/%.c ${DEPDIR}/%.d Makefile
${MKDIR} ${@D} && ${MKDIR} $(patsubst ${OBJDIR}/%,${DEPDIR}/%,${@D}) && ${CC} ${CFLAGS} ${DEPFLAGS} ${LFLAGS} -o $@ -c $< && touch $@ ${MKDIR} ${@D} && ${MKDIR} $(patsubst ${OBJDIR}/%,${DEPDIR}/%,${@D}) && ${CC} ${CFLAGS} ${DEPFLAGS} ${LFLAGS} -o $@ -c $< && touch $@
${APPDIR}/%.ldflags: ;
${DEPDIR}/%.d: ; ${DEPDIR}/%.d: ;
.PRECIOUS: ${DEPDIR}/%.d ${OBJDIR}/%.o .PRECIOUS: ${DEPDIR}/%.d ${OBJDIR}/%.o
......
#include "../ui/View.h" #include "ui/View.h"
namespace rmrf {
int main() { int main() {
ui::init_ui(); auto ui_handle = std::make_shared<rmrf::ui::display>();
ui::destroy_ui();
return 0;
}
return 0;
} }
File moved
#include <ncurses/cursesw.h> #ifdef __UNIX__
#include <ncurses/cursesw.h>
#else
#include <ncursesw/ncurses.h>
#endif
#include "View.h" #include "ui/View.h"
namespace rmrf { namespace rmrf::ui {
namespace ui {
void init_ui() { display::display() {
initscr(); initscr();
} }
void destroy_ui() { display::~display() {
endwin(); endwin();
} }
}
} }
#ifndef VIEW_H #pragma once
#define VIEW_H
namespace rmrf { #include <memory>
namespace ui {
void init_ui( void ); namespace rmrf::ui {
void destroy_ui( void );
struct display : std::enable_shared_from_this<display> {
display();
~display();
};
} }
}
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment