forked from mruby/mruby
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a first implementation of mrbgems with one fixed MD5 gem
- Loading branch information
Showing
8 changed files
with
596 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# makefile description. | ||
# add gems to the ruby library | ||
|
||
LIBRGEMS := ../lib/libmruby_gems.a | ||
INIT := init_gems | ||
RM_F := rm -f | ||
CC_FLAGS := -Wall -Werror-implicit-function-declaration -g -O3 -MMD -I. -I./../include | ||
|
||
############################## | ||
# generic build targets, rules | ||
|
||
.PHONY : all | ||
all : $(INIT).o | ||
|
||
$(INIT).o : $(INIT).c | ||
gcc $(CC_FLAGS) -c $(INIT).c -o $(INIT).o | ||
@$(MAKE) -C md5 | ||
|
||
.PHONY : clean | ||
clean : | ||
$(RM_F) $(INIT).o $(INIT).d $(LIBRGEMS) | ||
@$(MAKE) clean -C md5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* This file will contain a list of all | ||
* initializing methods necessary to | ||
* bootstrap every gem. | ||
* | ||
*/ | ||
|
||
#include "mruby.h" | ||
|
||
void mrb_md5_gem_init(mrb_state*); | ||
|
||
void | ||
mrb_init_mrbgems(mrb_state *mrb) | ||
{ | ||
mrb_md5_gem_init(mrb); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
MRUBY_ROOT = ../.. | ||
|
||
INCLUDES = -I$(MRUBY_ROOT)/include -I$(MRUBY_ROOT)/src -I. | ||
CFLAGS = $(INCLUDES) -O3 -g -Wall -Werror-implicit-function-declaration | ||
|
||
CC = gcc | ||
LL = gcc | ||
AR = ar | ||
|
||
all : md5.o mrb_md5.o | ||
@echo done | ||
|
||
md5.o : md5.c md5.h | ||
gcc -c -I. md5.c | ||
|
||
mrb_md5.o : mrb_md5.c mrb_md5.h | ||
gcc -c $(CFLAGS) mrb_md5.c | ||
|
||
clean : | ||
rm -f *.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
mruby-md5 | ||
========= | ||
|
||
MD5 digest function |
Oops, something went wrong.