Rakefile: updated Rake build process
This commit is contained in:
parent
c33d40165c
commit
9e1967889e
28
Rakefile
28
Rakefile
@ -3,11 +3,13 @@ require'./inc.rb'
|
||||
|
||||
# Variables
|
||||
# -----------------------------
|
||||
$AS65 = 'xa'
|
||||
$CC = 'cc'
|
||||
$CFLAGS = '-Wfatal-errors'
|
||||
$LDFLAGS = '-lncurses'
|
||||
$OBJS = '65.o cpu.o ram.o rom.o disasm.o'
|
||||
$AS65 = 'xa'
|
||||
$CC = 'cc'
|
||||
$CFLAGS = '-Wfatal-errors'
|
||||
$LDFLAGS = '-lncurses -pthread -lpthread'
|
||||
$SDL2_CFLAGS = '`pkg-config --cflags sdl2`'
|
||||
$SDL2_LDFLAGS = '`pkg-config --libs sdl2`'
|
||||
$OBJS = 'cpu.o ram.o rom.o joy.o vis.o disasm.o'
|
||||
|
||||
$stdout_mutex=Mutex.new
|
||||
|
||||
@ -17,13 +19,23 @@ task :default => [:_65] do
|
||||
|
||||
end
|
||||
|
||||
task :all => [:_65, :test] do
|
||||
task :all => [:_65, :_65v, :_65sdl, :test] do
|
||||
|
||||
end
|
||||
|
||||
task :_65 => [:objs] do
|
||||
thread_print"CC\t65"
|
||||
`cc #{$CFLAGS} #{$LDFLAGS} #{$OBJS} -o 65`
|
||||
`cc #{$CFLAGS} 65.c #{$LDFLAGS} #{$OBJS} -o 65`
|
||||
end
|
||||
|
||||
task :_65v => [:objs] do
|
||||
thread_print"CC\t65v"
|
||||
`cc #{$CFLAGS} 65v.c #{$LDFLAGS} #{$OBJS} -o 65v`
|
||||
end
|
||||
|
||||
task :_65sdl => [:objs] do
|
||||
thread_print"CC\t65sdl"
|
||||
`cc #{$CFLAGS} 65sdl.c #{$SDL2_LDFLAGS} sdl.c #{$SDL2_CFLAGS} #{$LDFLAGS} #{$OBJS} -o 65sdl`
|
||||
end
|
||||
|
||||
task :test do
|
||||
@ -37,5 +49,5 @@ task :objs do
|
||||
end
|
||||
|
||||
task :clean do
|
||||
clean '65 *.nes *.o test/*.nes'.split
|
||||
clean '65 65v 65sdl *.nes *.o test/*.nes'.split
|
||||
end
|
||||
|
@ -5,8 +5,7 @@ require'../inc.rb'
|
||||
# -----------------------------
|
||||
$AS65 = 'xa'
|
||||
$CC = 'cc'
|
||||
#$OBJS = 'nes.nes asciitest.nes asl.nes ctest.nes'
|
||||
$OBJS = 'nes.nes asciitest.nes asl.nes'
|
||||
$OBJS = 'nes.nes asciitest.nes vram.nes'
|
||||
|
||||
$stdout_mutex=Mutex.new
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user