Build updates

This commit is contained in:
Kevin Lange 2014-03-27 23:37:38 -07:00
parent 6f4d55aeff
commit d7086574ca
3 changed files with 10 additions and 73 deletions

View File

@ -1,10 +1,7 @@
# ToAruOS Primary Build Script
# We always build with our targetted cross-compiler
ifneq ($(CCC_ANALYZE),yes)
CC = i686-pc-toaru-gcc
endif
NM = i686-pc-toaru-nm
# Build flags
@ -112,6 +109,8 @@ term: system
${EMU} ${EMUARGS} -append "vid=qemu start=--single $(DISK_ROOT)"
term-kvm: system
${EMU} ${EMUARGS} ${EMUKVM} -append "vid=qemu start=--single $(DISK_ROOT)"
term-beta: system
${EMU} ${EMUARGS} ${EMUKVM} -append "vid=qemu start=--single-beta logtoserial=1 $(DISK_ROOT)"
headless: system
${EMU} ${EMUARGS} -display none -append "start=--vga $(DISK_ROOT)"

View File

@ -32,71 +32,16 @@ void set_hostname() {
}
}
void start_terminal(char * arg) {
int start_options(char * args[]) {
int pid = fork();
if (!pid) {
char * tokens[] = {
"/bin/compositor",
"/bin/terminal",
"-Fl",
arg,
NULL
};
int i = execvp(tokens[0], tokens);
int i = execvp(args[0], args);
exit(0);
} else {
syscall_wait(pid);
return syscall_wait(pid);
}
}
void start_terminal_no_freetype(char * arg) {
int pid = fork();
if (!pid) {
char * tokens[] = {
"/bin/compositor",
"/bin/terminal",
"-Fklb",
arg,
NULL
};
int i = execv(tokens[0], tokens);
exit(0);
} else {
syscall_wait(pid);
}
}
void start_vga_terminal(char * arg) {
int pid = fork();
if (!pid) {
char * tokens[] = {
"/bin/vga-warning",
arg,
NULL
};
int i = execvp(tokens[0], tokens);
exit(0);
} else {
syscall_wait(pid);
}
}
void start_compositor() {
int pid = fork();
if (!pid) {
char * _tokens[] = {
"/bin/compositor",
NULL
};
execvp(_tokens[0], _tokens);
exit(0);
} else {
syscall_wait(pid);
}
}
int main(int argc, char * argv[]) {
/* Hostname */
set_hostname();
@ -106,15 +51,12 @@ int main(int argc, char * argv[]) {
args = argv[2];
}
if (!strcmp(argv[1],"--single")) {
start_terminal(args);
return 0;
return start_options((char *[]){"/bin/compositor","/bin/terminal","-Fl",args,NULL});
} else if (!strcmp(argv[1], "--single-beta")) {
return start_options((char *[]){"/bin/compositor-beta","/bin/drawlines",args,NULL});
} else if (!strcmp(argv[1], "--vga")) {
start_vga_terminal(args);
return 0;
} else if (!strcmp(argv[1], "--special")) {
start_terminal_no_freetype(args);
return 0;
return start_options((char *[]){"/bin/vga-warning",NULL});
}
}
start_compositor();
return start_options((char *[]){"/bin/compositor",NULL});
}

View File

@ -1,4 +0,0 @@
#!/bin/bash
make clean
CCC_ANALYZE=yes scan-build make