Skip to content

Commit bb7ec82

Browse files
committed
makefile + cpp updates
1 parent 2aafd36 commit bb7ec82

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

languages/compiled/c/cpp.org

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,25 @@
3131

3232
#+begin_src c
3333
#include <stdio.h>
34+
3435
#define FOO 2
36+
37+
#ifndef DIMENSION
38+
#define DIMENSION 200
39+
#endif
40+
3541
#define BAR(x,y) ((x) + (y))
42+
3643
// Variadic Arguments
37-
#define PRINTF_LOOP(iterations, ...) do { \
38-
for (int i = 0; i < (iterations); i++) { \
39-
printf(__VA_ARGS__); \
44+
#define PRINTF_LOOP(iterations, ...) do { \
45+
for (int i = 0; i < (iterations); i++) { \
46+
printf(__VA_ARGS__); \
4047
}
48+
4149
// Defining functions per type
42-
#define GENERIC_ADD_FUNC(type) \
43-
type add_##type(type x, type y) { \
44-
return x + y; \
50+
#define GENERIC_ADD_FUNC(type) \
51+
type add_##type(type x, type y) { \
52+
return x + y; \
4553
}
4654
GENERIC_ADD_FUNC(float)
4755
#+end_src

languages/compiled/makefile/self.org

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
| gnu | [[https://www.gnu.org/software/make/][home]] [[https://www.gnu.org/software/make/manual/html_node/index.html][docs]] |
1212
| bsd | [[https://man.freebsd.org/cgi/man.cgi?make(1)][man]] |
1313
| posix | [[https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html][home]] |
14+
| original | [[https://pages.cs.wisc.edu/~horwitz/make/make.pdf][.pdf]] |
1415
| fork | https://justine.lol/make/ |
1516
| alternatives | [[https://github.com/casey/just][just]] [[https://taskfile.dev/][Task]] [[https://snakemake.github.io/][Snakemake]] |
1617
|--------------+---------------------------|

0 commit comments

Comments
 (0)