Hello, world!
This commit is contained in:
6
.dir-locals.el
Normal file
6
.dir-locals.el
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
;;; Directory Local Variables -*- no-byte-compile: t; -*-
|
||||||
|
;;; For more information see (info "(emacs) Directory Variables")
|
||||||
|
|
||||||
|
((nil . ((+license/license-choice . "GNU General Public License Version 2")
|
||||||
|
(compile-command . "make run")))
|
||||||
|
(c++-mode . ((mode . clang-format))))
|
||||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
build/
|
||||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2024 Aryadev Chavali
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
50
Makefile
Normal file
50
Makefile
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
CC=g++
|
||||||
|
OUT=cwtree.out
|
||||||
|
LIBS=
|
||||||
|
ARGS=
|
||||||
|
|
||||||
|
RELEASE=0
|
||||||
|
GFLAGS=-Wall -Wextra -Wswitch-enum -std=c++17
|
||||||
|
DFLAGS=-ggdb -fsanitize=address -fsanitize=undefined
|
||||||
|
RFLAGS=-O3
|
||||||
|
DEPFLAGS=-MT $@ -MMD -MP -MF
|
||||||
|
|
||||||
|
ifeq ($(RELEASE), 1)
|
||||||
|
CFLAGS=$(GFLAGS) $(RFLAGS)
|
||||||
|
else
|
||||||
|
CFLAGS=$(GFLAGS) $(DFLAGS)
|
||||||
|
endif
|
||||||
|
|
||||||
|
SRC=src
|
||||||
|
DIST=build
|
||||||
|
CODE=$(addprefix $(SRC)/, ) # add source files here
|
||||||
|
OBJECTS=$(CODE:$(SRC)/%.cpp=$(DIST)/%.o)
|
||||||
|
DEPDIR:=$(DIST)/dependencies
|
||||||
|
DEPS:=$(CODE:$(SRC)/%.cpp=$(DEPDIR):%.d) $(DEPDIR)/main.d
|
||||||
|
|
||||||
|
.PHONY: all
|
||||||
|
all: $(OUT)
|
||||||
|
|
||||||
|
$(OUT): $(DIST)/$(OUT)
|
||||||
|
|
||||||
|
$(DIST)/$(OUT): $(OBJECTS) $(DIST)/main.o | $(DIST)
|
||||||
|
$(CC) $(CFLAGS) $^ -o $@ $(LIBS)
|
||||||
|
|
||||||
|
$(DIST)/%.o: $(SRC)/%.cpp | $(DIST) $(DEPDIR)
|
||||||
|
$(CC) $(CFLAGS) $(DEPFLAGS) $(DEPDIR)/$*.d -c $< -o $@ $(LIBS)
|
||||||
|
|
||||||
|
.PHONY: run
|
||||||
|
run: $(DIST)/$(OUT)
|
||||||
|
./$^ $(ARGS)
|
||||||
|
|
||||||
|
.PHONY:
|
||||||
|
clean:
|
||||||
|
rm -rfv $(DIST)/*
|
||||||
|
|
||||||
|
$(DIST):
|
||||||
|
mkdir -p $(DIST)
|
||||||
|
|
||||||
|
$(DEPDIR):
|
||||||
|
mkdir -p $(DEPDIR)
|
||||||
|
|
||||||
|
-include $(DEPS)
|
||||||
24
src/main.cpp
Normal file
24
src/main.cpp
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
/* Copyright (C) 2024 Aryadev Chavali
|
||||||
|
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE. See the GNU General Public License Version 2 for
|
||||||
|
* details.
|
||||||
|
|
||||||
|
* You may distribute and modify this code under the terms of the GNU General
|
||||||
|
* Public License Version 2, which you should have received a copy of along with
|
||||||
|
* this program. If not, please go to <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
* Created: 2024-07-25
|
||||||
|
* Author: Aryadev Chavali
|
||||||
|
* Description: Entrypoint
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <cstdio>
|
||||||
|
#include <raylib.h>
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
puts("Hello, world!");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user