wip
This commit is contained in:
parent
2b3b709e22
commit
45751c6e67
4 changed files with 31 additions and 3 deletions
2
Makefile
2
Makefile
|
|
@ -1,5 +1,5 @@
|
|||
CC = cc
|
||||
CFLAGS = -I external/xemil/include
|
||||
CFLAGS = -I external/xemil/include -I src
|
||||
LDFLAGS =
|
||||
LIBS =
|
||||
|
||||
|
|
|
|||
2
objs.sh
2
objs.sh
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
echo > objs.mk
|
||||
ls external/xemil/src/*.c src/*.c | while read a; do
|
||||
ls src/*.c external/xemil/src/*.c | while read a; do
|
||||
O="src/`echo "$a" | sed 's/.c$/.o/' | sed 's/\//_/g'`"
|
||||
echo "OBJS += $O" >> objs.mk
|
||||
echo "$O: $a" >> objs.mk
|
||||
|
|
|
|||
22
src/main.c
22
src/main.c
|
|
@ -1,4 +1,24 @@
|
|||
#include <stdio.h>
|
||||
#include <taiga.h>
|
||||
|
||||
int main(int argc, char** argv){
|
||||
int i;
|
||||
char* action;
|
||||
int target_argc = 0;
|
||||
char** target_argv = malloc(sizeof(*target_argv));
|
||||
target_argv[0] = NULL;
|
||||
|
||||
for(i = 1; i < argc; i++){
|
||||
if(argv[i][0] == '-'){
|
||||
if(action != NULL) continue;
|
||||
}else{
|
||||
if(action != NULL) continue;
|
||||
action = argv[i];
|
||||
|
||||
free(target_argv);
|
||||
target_argc = argc - i - 1;
|
||||
target_argv = &argv[i + 1];
|
||||
}
|
||||
}
|
||||
|
||||
if(action == NULL) action = "site";
|
||||
}
|
||||
|
|
|
|||
8
src/taiga.h
Normal file
8
src/taiga.h
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#ifndef __TAIGA_H__
|
||||
#define __TAIGA_H__
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue