Przeglądaj źródła

Add playground file

Ole 9 lat temu
rodzic
commit
9fbb5156b9
2 zmienionych plików z 15 dodań i 1 usunięć
  1. 10 1
      Makefile
  2. 5 0
      examples/playground.cpp

+ 10 - 1
Makefile

@@ -16,6 +16,11 @@ EXAMPLE_SRCS    := types.cpp stack.cpp functions.cpp usertypes.cpp state.cpp tab
 EXAMPLE_DEPS    := $(EXAMPLE_SRCS:%.cpp=$(EXAMPLE_DIR)/%.d)
 EXAMPLE_OBJS    := $(EXAMPLE_SRCS:%.cpp=$(EXAMPLE_DIR)/%.out)
 
+# Playground artifacts
+PLAYGROUND_SRC  := playground.cpp
+PLAYGROUND_DEP  := $(PLAYGROUND_SRC:%.cpp=$(EXAMPLE_DIR)/%.d)
+PLAYGROUND_OBJ  := $(PLAYGROUND_SRC:%.cpp=$(EXAMPLE_DIR)/%.out)
+
 # Lua-specific
 LUA_INCDIR      = /usr/include
 LUA_LIBDIR      = /usr/lib
@@ -63,5 +68,9 @@ examples: $(EXAMPLE_OBJS)
 $(EXAMPLE_DIR)/%.out: $(EXAMPLE_DIR)/%.cpp Makefile
 	$(CXX) $(USECXXFLAGS) $(USELDFLAGS) -MMD -MF$(<:%.cpp=%.d) -MT$@ -o$@ $< $(USELDLIBS)
 
+# Playground
+playground: $(PLAYGROUND_OBJ)
+	./$(PLAYGROUND_OBJ)
+
 # Phony
-.PHONY: all clean docs test examples
+.PHONY: all clean docs test examples playground

+ 5 - 0
examples/playground.cpp

@@ -0,0 +1,5 @@
+#include <luwra.hpp>
+
+int main() {
+	return 0;
+}