hello world!

This commit is contained in:
2026-01-22 17:55:59 +00:00
commit 4ac780e3e9
6 changed files with 88 additions and 0 deletions

7
.dir-locals.el Normal file
View File

@@ -0,0 +1,7 @@
;;; Directory Local Variables -*- no-byte-compile: t -*-
;;; For more information see (info "(emacs) Directory Variables")
((nil . ((compile-command . "make MODE=debug -B -k")
(+license/license-choice . "MIT License")))
(c-mode . ((mode . clang-format)))
(c++-mode . ((mode . clang-format))))

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
build/

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 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.

33
Makefile Normal file
View File

@@ -0,0 +1,33 @@
CXX=c++
DIST=build
OUT=$(DIST)/main.out
LDFLAGS=
GFLAGS=-Wall -Wextra -Wpedantic -std=c++23
DFLAGS=-ggdb -fsanitize=address -fsanitize=undefined
RFLAGS=-O3
MODE=release
ifeq ($(MODE), release)
CFLAGS=$(GFLAGS) $(RFLAGS)
else
CFLAGS=$(GFLAGS) $(DFLAGS)
endif
$(OUT): $(DIST)/main.o | $(DIST)
$(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
$(DIST)/main.o: main.cpp | $(DIST)
$(CXX) $(CFLAGS) -c -o $@ $^
$(DIST):
mkdir -p $(DIST)
.PHONY: run clean
ARGS=
run: $(OUT)
./$^ $(ARGS)
clean:
rm -rf $(DIST)

0
README Normal file
View File

26
main.cpp Normal file
View File

@@ -0,0 +1,26 @@
/* main.cpp:
* Created: 2026-01-22
* Author: Aryadev Chavali
* License: See end of file
* Commentary:
*/
#include <cstdio>
int main(void)
{
puts("Hello, world!");
return 0;
}
/* Copyright (C) 2026 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 MIT License for details.
* You may distribute and modify this code under the terms of the MIT License,
* which you should have received a copy of along with this program. If not,
* please go to <https://opensource.org/license/MIT>.
*/