Skip to content

Commit 5e3d17f

Browse files
committed
init
1 parent 44ff342 commit 5e3d17f

7 files changed

Lines changed: 724 additions & 0 deletions

File tree

bin2cpp20/Makefile.ux

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
CXXFLAGS = -std=c++20
2+
LDFLAGS =
3+
CPP_FILES := $(wildcard *.cpp)
4+
OBJ_FILES := $(CPP_FILES:.cpp=.o)
5+
OUTPUT_NAME = bin2cpp20
6+
DEPS := $(wildcard *.hpp)
7+
8+
%.o: %.cpp $(DEPS)
9+
$(CXX) $(CXXFLAGS) -c $< -o $@
10+
11+
$(OUTPUT_NAME): $(OBJ_FILES)
12+
$(CXX) $^ -o $@ $(LDFLAGS)
13+
14+
all: $(OUTPUT_NAME)
15+
16+
install: all
17+
cp $(OUTPUT_NAME) /usr/local/bin
18+
19+
clean:
20+
rm -f $(OUTPUT_NAME) $(OBJ_FILES)
21+
22+
.PHONY: all install clean

bin2cpp20/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# bin2cpp20
2+
3+
Unix Tool to Convert a stream to a C++20 array/vector/string
4+
5+
% cat *cpp | bin2cpp20 -i stdin -v variablename
6+
7+
% bin2cpp20 -i filename -o outputheader -v variable
8+
9+
% bin2cpp20 -i filename -o -v variable -s --sort
10+
11+
or arguments:
12+
13+
jared@iLostSideDead bin2cpp % bin2cpp20 -h
14+
15+
-h help
16+
17+
-i input file/stdin
18+
19+
-o output
20+
21+
-s string output
22+
23+
-v variable name
24+
25+
-z sort
26+
27+
--help help message
28+
29+
--input input file/stdin
30+
31+
--output output file
32+
33+
--string string output
34+
35+
--variable variable name
36+
37+
--sort sort string
38+

0 commit comments

Comments
 (0)