Created
July 17, 2018 08:03
-
-
Save halllllll/cf059bbb8e5409cbd1c246d9c6ee8266 to your computer and use it in GitHub Desktop.
my first Rakefile practice.
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
#include <stdio.h> | |
#include "message.h" | |
int main(void){ | |
printf("hello, "); | |
message(); | |
return 0; | |
} |
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
#include <stdio.h> | |
int message(void){ | |
printf("fuckin world!"); | |
return 0; | |
} |
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
int message(); |
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
#参考 http://www2s.biglobe.ne.jp/~idesaku/sss/tech/rake/ | |
require 'rake/clean' | |
# なぜか消えない | |
CLEAN.include('*.o') | |
CLOBBER.include('*.o') | |
CLEAN << "*.o" | |
CLOBBER << "*.o" | |
CC = "gcc" | |
BIN_OUT = "./out" | |
# なぜか作成されない | |
directory BIN_OUT | |
task :default => "hello" | |
file "hello" => ["hello.o", "message.o"] do |t| | |
sh "#{CC} -o #{t.name} #{t.prerequisites.join(' ')}" | |
end | |
rule '.o' => '.c' do |t| | |
sh "#{CC} -c #{t.source}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment