diff options
| author | Daniel Bovensiepen <[email protected]> | 2012-09-19 23:18:35 +0800 |
|---|---|---|
| committer | Daniel Bovensiepen <[email protected]> | 2012-09-19 23:18:35 +0800 |
| commit | ab548b1c19a23cb6e8369a67d03f4c60a54f8a54 (patch) | |
| tree | ea792d474e0536dff15de6e9a619f918a888f231 /mrbgems/g/hello_world/Makefile | |
| parent | e7425584e3aebc0295f1b55f7f44c2c5f5583964 (diff) | |
| download | mruby-ab548b1c19a23cb6e8369a67d03f4c60a54f8a54.tar.gz mruby-ab548b1c19a23cb6e8369a67d03f4c60a54f8a54.zip | |
add hello world test program
Diffstat (limited to 'mrbgems/g/hello_world/Makefile')
| -rw-r--r-- | mrbgems/g/hello_world/Makefile | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/mrbgems/g/hello_world/Makefile b/mrbgems/g/hello_world/Makefile new file mode 100644 index 000000000..50a92f03a --- /dev/null +++ b/mrbgems/g/hello_world/Makefile @@ -0,0 +1,25 @@ +GEMNAME := hello_world +MRUBY_ROOT = ../../../ + +INCLUDES = -I$(MRUBY_ROOT)include -I$(MRUBY_ROOT)src -I. +CFLAGS = $(INCLUDES) -O3 -g -Wall -Werror-implicit-function-declaration +RM_F := rm -f +AR := ar + +ifeq ($(strip $(LIBR)),) + # default mruby library + LIBR = $(MRUBY_ROOT)lib/libmruby.a +endif + +.PHONY : all +all : src/hello_world.o + @$(AR) rs $(LIBR) src/hello_world.o + @echo "Gem '$(GEMNAME)' is done" + +src/hello_world.o : src/hello_world.c + @gcc -c $(CFLAGS) src/hello_world.c -o src/hello_world.o + +.PHONY : clean +clean : + -$(RM_F) src/*.o + @echo "Gem '$(GEMNAME)' is clean" |
