Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate cpp output #5

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ BOOKS = principles-of-programming computational-foundations-1

all: build deploy

build: build_preprocess build_jupyter_books build_pdflatex build_merge_html
build: build_jupyter_books build_pdflatex build_merge_html

build_preprocess:
./in2md.sh files/cppintro.md.in > files/cppintro.md
./in2md.sh files/libraries_happly.md.in > files/libraries_happly.md
./in2md.sh files/libraries_happly_boostgeometry.md.in > files/libraries_happly_boostgeometry.md
cd cpp && ./maker.sh && cd ..

build_jupyter_books:
for book in $(BOOKS) ; do \
Expand All @@ -21,14 +22,13 @@ build_pdflatex:
done

build_merge_html:
mkdir -p _html
rm -rf _html && mkdir -p _html
for book in $(BOOKS) ; do \
cp -a _build/$${book}/_build/html/. _html/$${book}/ ; \
done
cp index.html _html

deploy:
cp _html/* /var/www/html/programming -R
rsync -a --delete _html/ /var/www/html/programming

upload:
rsync --no-perms --no-owner --no-group -avz --delete-after _html/* [email protected]:~/webserver/htdocs/en/teaching/oer/programming
1 change: 0 additions & 1 deletion computational-foundations-1_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,3 @@ First the dates in 2022/23:
|24.01.2023 | Lecture |
|31.01.2023 | Lecture |
|07.02.2023 | Lecture |
|-----------|--------------------|
13 changes: 7 additions & 6 deletions cpp/.gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
out.ply
*out
# files without an extension
*
!/**/
!*.*

*.o
01_oldhelloworld
02_functionsignatures
03_library
libs_pcl_happly

*.ply
1 change: 1 addition & 0 deletions cpp/00_helloworld.makeout
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
g++ -Wall -o 00_helloworld.out 00_helloworld.cpp
4 changes: 2 additions & 2 deletions cpp/00_helloworld.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all:
g++ -Wall -o 00_helloworld.out 00_helloworld.cpp
g++ -Wall -o 00_helloworld 00_helloworld.cpp
run:
./00_helloworld.out
./00_helloworld
2 changes: 2 additions & 0 deletions cpp/00_helloworld.runout
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
./00_helloworld.out
Hello World!
1 change: 1 addition & 0 deletions cpp/01_oldhelloworld.makeout
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
g++ -Wall -o 01_oldhelloworld 01_oldhelloworld.cpp
2 changes: 2 additions & 0 deletions cpp/01_oldhelloworld.runout
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
./01_oldhelloworld
Hello World!
1 change: 1 addition & 0 deletions cpp/02_functionsignatures.makeout
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
g++ -Wall -o 02_functionsignatures 02_functionsignatures.cpp
3 changes: 3 additions & 0 deletions cpp/02_functionsignatures.runout
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
./02_functionsignatures
doubled(4)=8
doubled(4.5)=9
3 changes: 3 additions & 0 deletions cpp/03_library.makeout
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
g++ -c 03_doubled.cpp -o 03_doubled.o
g++ -c 03_library.cpp -o 03_library.o
g++ -o 03_library 03_library.o 03_doubled.o
3 changes: 3 additions & 0 deletions cpp/03_library.runout
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
./03_library
doubled(4)=8
doubled(4.5)=9
1 change: 1 addition & 0 deletions cpp/libs_pcl_happly.makeout
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
g++ -Wall -march=native -Ofast -o libs_pcl_happly libs_pcl_happly.cpp `pkg-config --cflags --libs eigen3`
25 changes: 25 additions & 0 deletions cpp/libs_pcl_happly.runout
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
./libs_pcl_happly ../data/sofa_0007.off.ply
1.19209e-07 5.35772e-09 1
0.968583 -0.24869 5.35772e-09
0.24869 0.968583 1.19209e-07
X:12.5626 1.57161 62.3903
Y:12.5626 1.57161 62.3903
X:10.5998 26.6352 34.551
Y:10.5998 26.6352 34.551
X: -13.9611 -0.0370637 -52.1099
Y: -13.9611 -0.0370638 -52.1099
X:0.212058 8.69847 50.2384
Y:0.212058 8.69847 50.2384
X:19.5171 19.3644 53.821
Y:19.5171 19.3644 53.821
X:-8.74778 -33.4929 -27.8639
Y:-8.74778 -33.4929 -27.8639
X:-2.20324 27.7459 50.2467
Y:-2.20324 27.7459 50.2467
X:-5.69343 -27.1792 -50.2527
Y:-5.69343 -27.1792 -50.2527
X:-9.87796 38.5962 7.98784
Y:-9.87796 38.5962 7.98784
X:-13.9611 28.2719 -8.07317
Y:-13.9611 28.2719 -8.07317
Warper
12 changes: 0 additions & 12 deletions index.html

This file was deleted.

1 change: 0 additions & 1 deletion principles-of-programming_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ First the dates in 2022/23:
|24.01.2023 | Lecture + Tutorial |
|31.01.2023 | Lecture + Tutorial |
|07.02.2023 | Lecture + Tutorial |
|-----------|--------------------|

## Modules

Expand Down