demake 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/demake +166 -177
- data/lib/apps/example/Makefile +374 -0
- data/lib/{data → apps}/example/demake/applications +1 -1
- data/lib/apps/example/demake/brief_description +1 -0
- data/lib/{data → apps}/example/demake/license +0 -0
- data/lib/{data → apps}/example/demake/settings.rb +18 -15
- data/lib/apps/example/demake/suggestion +1 -0
- data/lib/{data → apps}/example/demake/test-target.rb +0 -0
- data/lib/apps/oreo/Makefile +260 -0
- data/lib/{data → apps}/oreo/demake/applications +0 -0
- data/lib/apps/oreo/demake/brief_description +1 -0
- data/lib/{data → apps}/oreo/demake/license +0 -0
- data/lib/{data → apps}/oreo/demake/settings.rb +14 -11
- data/lib/apps/oreo/demake/suggestion +1 -0
- data/lib/{data → apps}/oreo/demake/test-target.rb +0 -0
- data/lib/apps/oreo/src/defines.h +29 -0
- data/lib/{data → apps}/oreo/src/fast_read_file.h +18 -18
- data/lib/{data → apps}/oreo/src/oreo.c +4 -4
- data/lib/{data → apps}/oreo/src/typedefs.h +8 -8
- data/lib/data/libsrc/auto_bits.h +33 -0
- data/lib/data/libsrc/base.h +10 -0
- data/lib/data/libsrc/cpu_mark_check.h +267 -0
- data/lib/data/libsrc/defines.h +29 -0
- data/lib/data/libsrc/fast_read_file.h +259 -0
- data/lib/data/libsrc/fast_sha2.h +1840 -0
- data/lib/data/libsrc/parse_arguments.h +0 -0
- data/lib/data/libsrc/rb_library.c +140 -0
- data/lib/data/libsrc/simple_linked_list +0 -0
- data/lib/data/libsrc/simple_linked_list.c +36 -0
- data/lib/data/libsrc/simple_linked_list.h +91 -0
- data/lib/data/libsrc/smart_alloc.h +45 -0
- data/lib/data/libsrc/typedefs.h +61 -0
- data/lib/template/build_target.rb +0 -0
- data/lib/template/clean_target.rb +25 -1
- data/lib/template/debug_executable_target.rb +0 -0
- data/lib/template/debug_library_target.rb +0 -0
- data/lib/template/debug_target.rb +0 -0
- data/lib/template/dependency_targets.rb +0 -0
- data/lib/template/executable_debug_target.rb +0 -0
- data/lib/template/executable_target.rb +0 -0
- data/lib/template/generic_dependency_targets.rb +0 -0
- data/lib/template/library_debug_target.rb +0 -0
- data/lib/template/library_target.rb +0 -0
- data/lib/template/license_target.rb +0 -0
- data/lib/template/link_library_target.rb +0 -0
- data/lib/template/strip_build.rb +0 -0
- metadata +39 -20
- data/lib/data/oreo/src/defines.h +0 -29
- /data/lib/{data → apps}/example/src/goodbye.c +0 -0
- /data/lib/{data → apps}/example/src/hello.c +0 -0
- /data/lib/{data → apps}/example/src/string/string.c +0 -0
- /data/lib/{data → apps}/example/src/string/string.h +0 -0
- /data/lib/{data → apps}/oreo/oreo_test.txt +0 -0
|
Binary file
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
#include <ruby.h>
|
|
2
|
+
|
|
3
|
+
/* b8 */
|
|
4
|
+
|
|
5
|
+
static VALUE rb_b8(VALUE self, VALUE rb_value) {
|
|
6
|
+
b8 c_value = FALSE;
|
|
7
|
+
/* Ruby value to C */
|
|
8
|
+
b8 rb_b8 = RTEST(rb_value);
|
|
9
|
+
|
|
10
|
+
/* Gets rid of compiler warning */
|
|
11
|
+
if(!self)
|
|
12
|
+
return Qnil;
|
|
13
|
+
|
|
14
|
+
/* C value to Ruby */
|
|
15
|
+
return(c_value ? Qtrue : Qfalse);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* i32 */
|
|
19
|
+
|
|
20
|
+
static VALUE rb_i32(VALUE self, VALUE rb_value) {
|
|
21
|
+
i32 c_value = 0;
|
|
22
|
+
/* Ruby value to C */
|
|
23
|
+
i32 rb_i32 = (i32)NUM2LONG(rb_value);
|
|
24
|
+
|
|
25
|
+
/* Gets rid of compiler warning */
|
|
26
|
+
if(!self)
|
|
27
|
+
return Qnil;
|
|
28
|
+
|
|
29
|
+
/* C value to Ruby */
|
|
30
|
+
return(INT2NUM(c_value));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* u32 */
|
|
34
|
+
|
|
35
|
+
static VALUE rb_u32(VALUE self, VALUE rb_value) {
|
|
36
|
+
u32 c_value = 0;
|
|
37
|
+
/* Ruby value to C */
|
|
38
|
+
u32 rb_u32 = (u32)NUM2ULONG(rb_value);
|
|
39
|
+
|
|
40
|
+
/* Gets rid of compiler warning */
|
|
41
|
+
if(!self)
|
|
42
|
+
return Qnil;
|
|
43
|
+
|
|
44
|
+
/* C value to Ruby */
|
|
45
|
+
return(ULONG2NUM(c_value));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* i64 */
|
|
49
|
+
|
|
50
|
+
static VALUE rb_i64(VALUE self, VALUE rb_value) {
|
|
51
|
+
i64 c_value = 0;
|
|
52
|
+
/* Ruby value to C */
|
|
53
|
+
i64 rb_i64 = (i64)NUM2LL(rb_value);
|
|
54
|
+
|
|
55
|
+
/* Gets rid of compiler warning */
|
|
56
|
+
if(!self)
|
|
57
|
+
return Qnil;
|
|
58
|
+
|
|
59
|
+
/* C value to Ruby */
|
|
60
|
+
return(LL2NUM(c_value));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* u64 */
|
|
64
|
+
|
|
65
|
+
static VALUE rb_u64(VALUE self, VALUE rb_value) {
|
|
66
|
+
u64 c_value = 0;
|
|
67
|
+
/* Ruby value to C */
|
|
68
|
+
u64 rb_u64 = (u64)NUM2ULL(rb_value);
|
|
69
|
+
|
|
70
|
+
/* Gets rid of compiler warning */
|
|
71
|
+
if(!self)
|
|
72
|
+
return Qnil;
|
|
73
|
+
|
|
74
|
+
/* C value to Ruby */
|
|
75
|
+
return(ULL2NUM(c_value));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
static VALUE rb_string(VALUE self, VALUE rb_message) {
|
|
79
|
+
const c8 c_value = "string";
|
|
80
|
+
/* Ruby value to C */
|
|
81
|
+
uc8 *rb_string = (uc8 *)RSTRING_PTR(rb_message);
|
|
82
|
+
|
|
83
|
+
/* Gets rid of compiler warning */
|
|
84
|
+
if(!self)
|
|
85
|
+
return Qnil;
|
|
86
|
+
|
|
87
|
+
/* C value to Ruby */
|
|
88
|
+
return(rb_str_new2((const c8 *)c_value));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
static VALUE rb_c_function0(VALUE self) {
|
|
92
|
+
b8 c_value = FALSE;
|
|
93
|
+
|
|
94
|
+
if(!self)
|
|
95
|
+
return Qnil;
|
|
96
|
+
|
|
97
|
+
return(c_value ? Qtrue : Qfalse);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
static VALUE rb_c_function1(VALUE self, VALUE rb_value1) {
|
|
101
|
+
b8 rb_b8 = RTEST(rb_value1);
|
|
102
|
+
b8 c_value = FALSE;
|
|
103
|
+
|
|
104
|
+
if(!self)
|
|
105
|
+
return Qnil;
|
|
106
|
+
|
|
107
|
+
return(c_value ? Qtrue : Qfalse);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
static VALUE rb_c_function2(VALUE self, VALUE rb_value1, VALUE rb_value2) {
|
|
111
|
+
b8 c_value = FALSE;
|
|
112
|
+
b8 rb_b8 = RTEST(rb_value1);
|
|
113
|
+
u32 rb_u32 = (u32)NUM2ULONG(rb_value2);
|
|
114
|
+
|
|
115
|
+
if(!self)
|
|
116
|
+
return Qnil;
|
|
117
|
+
|
|
118
|
+
return(c_value ? Qtrue : Qfalse);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* Different main entry point for debugging library, otherwise, everything is the same */
|
|
122
|
+
#ifdef library_DEBUG
|
|
123
|
+
void Init_library_debug(void) {
|
|
124
|
+
#else
|
|
125
|
+
void Init_library(void) {
|
|
126
|
+
#endif
|
|
127
|
+
VALUE library_module = rb_define_module("RB_MODULE_NAME");
|
|
128
|
+
VALUE helpers = rb_define_class_under(library_module, "RB_CLASS_NAME", rb_cObject);
|
|
129
|
+
|
|
130
|
+
/* RB_MODULE_NAME.ruby_method */
|
|
131
|
+
rb_define_method(library_module, "ruby_method0", rb_c_function0(), 0);
|
|
132
|
+
|
|
133
|
+
/* RB_MODULE_NAME::RB_CLASS_NAME.ruby_method */
|
|
134
|
+
/* No argument */
|
|
135
|
+
rb_define_singleton_method(helpers, "ruby_method0", rb_c_function0(), 0);
|
|
136
|
+
/* 1 object argument */
|
|
137
|
+
rb_define_singleton_method(helpers, "ruby_method1", rb_c_function1(), 1);
|
|
138
|
+
/* 2 object arguments */
|
|
139
|
+
rb_define_singleton_method(helpers, "ruby_method2", rb_c_function2(), 2);
|
|
140
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#include <stdio.h>
|
|
2
|
+
#include <stdlib.h>
|
|
3
|
+
|
|
4
|
+
#include "base.h"
|
|
5
|
+
#define SIMPLE_DOUBLE_LINKED_LIST
|
|
6
|
+
#define SIMPLE_LINKED_LIST_IMPLEMENTATION
|
|
7
|
+
#include "simple_linked_list.h"
|
|
8
|
+
|
|
9
|
+
i32 main(i32 argc, c8 *argv[])
|
|
10
|
+
{
|
|
11
|
+
struct simple_linked_list_s *head = NULL, *tail = NULL, *s = NULL;
|
|
12
|
+
c8 *a = "a", *b = "b", *c = "c", *d = "d", *e = "e", *f = "f";
|
|
13
|
+
|
|
14
|
+
head = s = calloc(1, sizeof(struct simple_linked_list_s));
|
|
15
|
+
simple_linked_list_init(s, a);
|
|
16
|
+
tail = s = calloc(1, sizeof(struct simple_linked_list_s));
|
|
17
|
+
simple_linked_list_insert_after(head, s, b);
|
|
18
|
+
s = calloc(1, sizeof(struct simple_linked_list_s));
|
|
19
|
+
simple_linked_list_insert_after(tail, s, c);
|
|
20
|
+
tail = s;
|
|
21
|
+
s = calloc(1, sizeof(struct simple_linked_list_s));
|
|
22
|
+
simple_linked_list_insert_after(tail, s, f);
|
|
23
|
+
tail = s;
|
|
24
|
+
s = calloc(1, sizeof(struct simple_linked_list_s));
|
|
25
|
+
simple_linked_list_insert_before(tail, s, e);
|
|
26
|
+
tail = s;
|
|
27
|
+
s = calloc(1, sizeof(struct simple_linked_list_s));
|
|
28
|
+
simple_linked_list_insert_before(tail, s, d);
|
|
29
|
+
|
|
30
|
+
s = head;
|
|
31
|
+
while(s) {
|
|
32
|
+
if(s && s->value && s->value != NULL)
|
|
33
|
+
printf("%s\n", (u8 *)s->value);
|
|
34
|
+
s = s->next;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/*
|
|
2
|
+
|
|
3
|
+
simple_linked_list.h -- *Full Library* Header File
|
|
4
|
+
|
|
5
|
+
Used to create simple linked lists
|
|
6
|
+
|
|
7
|
+
See the end of this file for an example.
|
|
8
|
+
|
|
9
|
+
Public Functions:
|
|
10
|
+
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
#ifndef SIMPLE_LINKED_LIST_H_Minaswan /* Prevent multiple inclusions */
|
|
14
|
+
#define SIMPLE_LINKED_LIST_H_Minaswan
|
|
15
|
+
#ifndef TYPEDEFS_H_Minaswan /* Header guard for typedefs.h */
|
|
16
|
+
#define TYPEDEFS_H_Minaswan
|
|
17
|
+
|
|
18
|
+
#endif /* TYPEDEFS_H_Minaswan */
|
|
19
|
+
|
|
20
|
+
struct simple_linked_list_s {
|
|
21
|
+
struct simple_linked_list_s *next;
|
|
22
|
+
#ifdef SIMPLE_DOUBLE_LINKED_LIST
|
|
23
|
+
struct simple_linked_list_s *previous;
|
|
24
|
+
#endif
|
|
25
|
+
void *value;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/* Public Functions */
|
|
29
|
+
|
|
30
|
+
#ifdef SIMPLE_LINKED_LIST_IMPLEMENTATION
|
|
31
|
+
void simple_linked_list_init(struct simple_linked_list_s *s, void *value)
|
|
32
|
+
{
|
|
33
|
+
#ifdef SIMPLE_DOUBLE_LINKED_LIST
|
|
34
|
+
s->previous = s->next = NULL;
|
|
35
|
+
#endif
|
|
36
|
+
s->value = value;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
void simple_linked_list_insert_after(struct simple_linked_list_s *position,
|
|
40
|
+
struct simple_linked_list_s *s, void *value)
|
|
41
|
+
{
|
|
42
|
+
s->value = value;
|
|
43
|
+
s->next = position->next;
|
|
44
|
+
#ifdef SIMPLE_DOUBLE_LINKED_LIST
|
|
45
|
+
s->previous = position;
|
|
46
|
+
if(position->next != NULL)
|
|
47
|
+
position->next->previous = s;
|
|
48
|
+
#endif
|
|
49
|
+
position->next = s;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
void simple_linked_list_insert_before(struct simple_linked_list_s *position,
|
|
53
|
+
struct simple_linked_list_s *s, void *value)
|
|
54
|
+
{
|
|
55
|
+
s->value = value;
|
|
56
|
+
s->next = position;
|
|
57
|
+
#ifdef SIMPLE_DOUBLE_LINKED_LIST
|
|
58
|
+
s->previous = position->previous;
|
|
59
|
+
if(position->previous != NULL)
|
|
60
|
+
position->previous->next = s;
|
|
61
|
+
position->previous = s;
|
|
62
|
+
#endif
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
#ifdef SIMPLE_DOUBLE_LINKED_LIST
|
|
66
|
+
void simple_linked_list_remove(struct simple_linked_list_s *s)
|
|
67
|
+
{
|
|
68
|
+
if(s->previous)
|
|
69
|
+
s->previous->next = s->next;
|
|
70
|
+
if(s->next)
|
|
71
|
+
s->next->previous = s->previous;
|
|
72
|
+
s->previous = s->next = NULL;
|
|
73
|
+
}
|
|
74
|
+
#endif
|
|
75
|
+
|
|
76
|
+
#endif /* SIMPLE_LINKED_LIST_IMPLEMENTATION */
|
|
77
|
+
#endif /* SIMPLE_LINKED_LIST_H_Minaswan */
|
|
78
|
+
|
|
79
|
+
/*
|
|
80
|
+
Example:
|
|
81
|
+
|
|
82
|
+
#define SIMPLE_LINKED_LIST_IMPLEMENTATION
|
|
83
|
+
#include "simple_linked_list.h"
|
|
84
|
+
|
|
85
|
+
struct simple_linked_list_s s;
|
|
86
|
+
c8 *a = "a", *b = "b", *c = "c";
|
|
87
|
+
|
|
88
|
+
simple_linked_list_init(&s, a);
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
*/
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
|
|
3
|
+
smart_alloc.h -- *Full Library* Header File
|
|
4
|
+
|
|
5
|
+
For smart alloc
|
|
6
|
+
|
|
7
|
+
See the end of this file for an example.
|
|
8
|
+
|
|
9
|
+
Public Functions:
|
|
10
|
+
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
#ifndef SMART_ALLOC_H_Minaswan /* Prevent multiple inclusions */
|
|
14
|
+
#define SMART_ALLOC_H_Minaswan
|
|
15
|
+
#ifndef TYPEDEFS_H_Minaswan /* Header guard for typedefs.h */
|
|
16
|
+
#define TYPEDEFS_H_Minaswan
|
|
17
|
+
|
|
18
|
+
#endif /* TYPEDEFS_H_Minaswan */
|
|
19
|
+
|
|
20
|
+
struct smart_alloc_data_s {
|
|
21
|
+
struct smart_alloc_data_s *next;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
struct smart_alloc_s {
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/* Public Functions */
|
|
28
|
+
|
|
29
|
+
#ifdef SMART_ALLOC_IMPLEMENTATION
|
|
30
|
+
|
|
31
|
+
#endif /* SMART_ALLOC_IMPLEMENTATION */
|
|
32
|
+
#endif /* SMART_ALLOC_H_Minaswan */
|
|
33
|
+
|
|
34
|
+
/*
|
|
35
|
+
Example:
|
|
36
|
+
|
|
37
|
+
#define SMART_ALLOC_IMPLEMENTATION
|
|
38
|
+
#include "smart_alloc.h"
|
|
39
|
+
|
|
40
|
+
i32 arena = smart_alloc_create(0);
|
|
41
|
+
|
|
42
|
+
smart_alloc(arena, size, align)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
*/
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/*
|
|
2
|
+
|
|
3
|
+
typedefs.h -- Include and typedefs for basic C types
|
|
4
|
+
|
|
5
|
+
These typedefs appear in all full library header files.
|
|
6
|
+
|
|
7
|
+
You can override all of them by including this file first and making your changes here.
|
|
8
|
+
|
|
9
|
+
To add text editor color highlight support for these typedefs see below.
|
|
10
|
+
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
#ifndef TYPEDEFS_H_Minaswan /* Prevents multiple inclusions */
|
|
14
|
+
#define TYPEDEFS_H_Minaswan
|
|
15
|
+
#define TYPEDEFS_VERSION "0.1.0"
|
|
16
|
+
#include <stdint.h>
|
|
17
|
+
|
|
18
|
+
typedef uint8_t b8; /* Booleans */
|
|
19
|
+
typedef uint16_t b16;
|
|
20
|
+
typedef uint32_t b32;
|
|
21
|
+
typedef uint64_t b64;
|
|
22
|
+
|
|
23
|
+
typedef char c8; /* Characters */
|
|
24
|
+
typedef unsigned char uc8;
|
|
25
|
+
|
|
26
|
+
typedef uint8_t u8; /* Unsigned Numbers */
|
|
27
|
+
typedef uint16_t u16;
|
|
28
|
+
typedef uint32_t u32;
|
|
29
|
+
typedef uint64_t u64;
|
|
30
|
+
|
|
31
|
+
typedef int8_t i8; /* Signed Numbers */
|
|
32
|
+
typedef int16_t i16;
|
|
33
|
+
typedef int32_t i32;
|
|
34
|
+
typedef int64_t i64;
|
|
35
|
+
|
|
36
|
+
typedef float f32; /* Floating Point Numbers */
|
|
37
|
+
typedef double f64;
|
|
38
|
+
#endif /* TYPEDEFS_H_Minaswan */
|
|
39
|
+
|
|
40
|
+
/*
|
|
41
|
+
|
|
42
|
+
For nvim, add to ~/.config/nvim/init.lua:
|
|
43
|
+
|
|
44
|
+
vim.cmd("syntax on")
|
|
45
|
+
vim.api.nvim_create_augroup("CustomCTypedefs", { clear = true })
|
|
46
|
+
vim.api.nvim_create_autocmd("FileType", {
|
|
47
|
+
group = "CustomCTypedefs",
|
|
48
|
+
pattern = { "c", "h", "cpp", "hpp" },
|
|
49
|
+
callback = function()
|
|
50
|
+
vim.cmd([[syntax match CustomTypedef /\<\(b8\|b16\|b32\|b64\|c8\|uc8\|i8\|i16\|i32\|i64\|u8\|u16\|u32\|u64\|f32\|f64\)\>/]])
|
|
51
|
+
vim.cmd([[highlight CustomTypedef guifg=green ctermfg=green]])
|
|
52
|
+
end,
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
For nano, add to /usr/share/nano/c.nanorc:
|
|
56
|
+
|
|
57
|
+
color green "\<(b8|b16|b32|b64|c8|uc8|i8|i16|i32|i64|u8|u16|u32|u64|f32|f64)\>"
|
|
58
|
+
|
|
59
|
+
For emacs, it would seem the magic is strong, because it just works. :)
|
|
60
|
+
|
|
61
|
+
*/
|
|
File without changes
|
|
@@ -1,6 +1,30 @@
|
|
|
1
|
-
|
|
1
|
+
# defaults to only removing the object directory
|
|
2
|
+
if(@clean_includes_binary_directory == true && @clean_includes_library_directory == true)
|
|
3
|
+
@clean_target = <<-END_OF_STRING
|
|
2
4
|
.PHONY : clean
|
|
3
5
|
clean :
|
|
4
6
|
\t@echo "#{@emoji_clean} Removed |Yeverything|n from |R$(OBJECT)|n, |R$(BINARY)|n, and |R$(LIBRARY)|n directories"
|
|
5
7
|
\t@rm -rf $(OBJECT) $(BINARY) $(LIBRARY)
|
|
6
8
|
END_OF_STRING
|
|
9
|
+
elsif(@clean_includes_binary_directory == true)
|
|
10
|
+
@clean_target = <<-END_OF_STRING
|
|
11
|
+
.PHONY : clean
|
|
12
|
+
clean :
|
|
13
|
+
\t@echo "#{@emoji_clean} Removed |Yeverything|n from |R$(OBJECT)|n and |R$(BINARY)|n directories"
|
|
14
|
+
\t@rm -rf $(OBJECT) $(BINARY) $(LIBRARY)
|
|
15
|
+
END_OF_STRING
|
|
16
|
+
elsif(@clean_includes_library_directory == true)
|
|
17
|
+
@clean_target = <<-END_OF_STRING
|
|
18
|
+
.PHONY : clean
|
|
19
|
+
clean :
|
|
20
|
+
\t@echo "#{@emoji_clean} Removed |Yeverything|n from |R$(OBJECT)|n and |R$(LIBRARY)|n directories"
|
|
21
|
+
\t@rm -rf $(OBJECT) $(BINARY) $(LIBRARY)
|
|
22
|
+
END_OF_STRING
|
|
23
|
+
else
|
|
24
|
+
@clean_target = <<-END_OF_STRING
|
|
25
|
+
.PHONY : clean
|
|
26
|
+
clean :
|
|
27
|
+
\t@echo "#{@emoji_clean} Removed |Yeverything|n from |R$(OBJECT)|n directory"
|
|
28
|
+
\t@rm -rf $(OBJECT)
|
|
29
|
+
END_OF_STRING
|
|
30
|
+
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/template/strip_build.rb
CHANGED
|
File without changes
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: demake
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Minaswan Nakamoto
|
|
@@ -65,7 +65,7 @@ description: |
|
|
|
65
65
|
|
|
66
66
|
> demake
|
|
67
67
|
|
|
68
|
-
You can also clone from git
|
|
68
|
+
You can also clone from git:
|
|
69
69
|
|
|
70
70
|
> git clone https://github.com/MinaswanNakamoto/demake.git
|
|
71
71
|
> chmod +x demake/bin/demake
|
|
@@ -84,23 +84,42 @@ extensions: []
|
|
|
84
84
|
extra_rdoc_files: []
|
|
85
85
|
files:
|
|
86
86
|
- bin/demake
|
|
87
|
-
- lib/
|
|
88
|
-
- lib/
|
|
89
|
-
- lib/
|
|
90
|
-
- lib/
|
|
91
|
-
- lib/
|
|
92
|
-
- lib/
|
|
93
|
-
- lib/
|
|
94
|
-
- lib/
|
|
95
|
-
- lib/
|
|
96
|
-
- lib/
|
|
97
|
-
- lib/
|
|
98
|
-
- lib/
|
|
99
|
-
- lib/
|
|
100
|
-
- lib/
|
|
101
|
-
- lib/
|
|
102
|
-
- lib/
|
|
103
|
-
- lib/
|
|
87
|
+
- lib/apps/example/Makefile
|
|
88
|
+
- lib/apps/example/demake/applications
|
|
89
|
+
- lib/apps/example/demake/brief_description
|
|
90
|
+
- lib/apps/example/demake/license
|
|
91
|
+
- lib/apps/example/demake/settings.rb
|
|
92
|
+
- lib/apps/example/demake/suggestion
|
|
93
|
+
- lib/apps/example/demake/test-target.rb
|
|
94
|
+
- lib/apps/example/src/goodbye.c
|
|
95
|
+
- lib/apps/example/src/hello.c
|
|
96
|
+
- lib/apps/example/src/string/string.c
|
|
97
|
+
- lib/apps/example/src/string/string.h
|
|
98
|
+
- lib/apps/oreo/Makefile
|
|
99
|
+
- lib/apps/oreo/demake/applications
|
|
100
|
+
- lib/apps/oreo/demake/brief_description
|
|
101
|
+
- lib/apps/oreo/demake/license
|
|
102
|
+
- lib/apps/oreo/demake/settings.rb
|
|
103
|
+
- lib/apps/oreo/demake/suggestion
|
|
104
|
+
- lib/apps/oreo/demake/test-target.rb
|
|
105
|
+
- lib/apps/oreo/oreo_test.txt
|
|
106
|
+
- lib/apps/oreo/src/defines.h
|
|
107
|
+
- lib/apps/oreo/src/fast_read_file.h
|
|
108
|
+
- lib/apps/oreo/src/oreo.c
|
|
109
|
+
- lib/apps/oreo/src/typedefs.h
|
|
110
|
+
- lib/data/libsrc/auto_bits.h
|
|
111
|
+
- lib/data/libsrc/base.h
|
|
112
|
+
- lib/data/libsrc/cpu_mark_check.h
|
|
113
|
+
- lib/data/libsrc/defines.h
|
|
114
|
+
- lib/data/libsrc/fast_read_file.h
|
|
115
|
+
- lib/data/libsrc/fast_sha2.h
|
|
116
|
+
- lib/data/libsrc/parse_arguments.h
|
|
117
|
+
- lib/data/libsrc/rb_library.c
|
|
118
|
+
- lib/data/libsrc/simple_linked_list
|
|
119
|
+
- lib/data/libsrc/simple_linked_list.c
|
|
120
|
+
- lib/data/libsrc/simple_linked_list.h
|
|
121
|
+
- lib/data/libsrc/smart_alloc.h
|
|
122
|
+
- lib/data/libsrc/typedefs.h
|
|
104
123
|
- lib/template/build_target.rb
|
|
105
124
|
- lib/template/clean_target.rb
|
|
106
125
|
- lib/template/debug_executable_target.rb
|
|
@@ -133,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
133
152
|
- !ruby/object:Gem::Version
|
|
134
153
|
version: '0'
|
|
135
154
|
requirements: []
|
|
136
|
-
rubygems_version:
|
|
155
|
+
rubygems_version: 4.0.10
|
|
137
156
|
specification_version: 4
|
|
138
157
|
summary: Develop, Decorate and manage Dependencies for C (GNU) Makefiles easily with
|
|
139
158
|
a Ruby script.
|
data/lib/data/oreo/src/defines.h
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
defines.h -- Basic C preprocessor macro definitions
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
#ifndef DEFINES_H_Minaswan /* Header guard to prevent multiple inclusions */
|
|
6
|
-
#define DEFINES_H_Minaswan
|
|
7
|
-
#define DEFINES_VERSION "0.1.0"
|
|
8
|
-
#ifndef NULL
|
|
9
|
-
#define NULL ((void *) 0)
|
|
10
|
-
#endif
|
|
11
|
-
#ifndef FALSE
|
|
12
|
-
#define FALSE 0
|
|
13
|
-
#endif
|
|
14
|
-
#ifndef TRUE
|
|
15
|
-
#define TRUE 1
|
|
16
|
-
#endif
|
|
17
|
-
#ifndef NO
|
|
18
|
-
#define NO 0
|
|
19
|
-
#endif
|
|
20
|
-
#ifndef YES
|
|
21
|
-
#define YES 1
|
|
22
|
-
#endif
|
|
23
|
-
#ifndef OFF
|
|
24
|
-
#define OFF 0
|
|
25
|
-
#endif
|
|
26
|
-
#ifndef ON
|
|
27
|
-
#define ON 1
|
|
28
|
-
#endif
|
|
29
|
-
#endif /* DEFINES_H_Minaswan */
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|