Sceleton
This commit is contained in:
parent
47f2cde673
commit
3a9ec5ecfe
|
@ -0,0 +1,24 @@
|
|||
BIN = FUUUUUCK
|
||||
CC = gcc
|
||||
LD = ld
|
||||
CFLAGS = -Wall
|
||||
LDFLAGS =
|
||||
SRCDIR = src/
|
||||
INCLUDE = include/
|
||||
OBJECTS = compilefuck.o
|
||||
|
||||
all: $(BIN)
|
||||
|
||||
$(BIN): $(OBJECTS)
|
||||
$(CC) -o $(BIN) $(OBJECTS) $(LDFLAGS)
|
||||
|
||||
%.o: $(SRCDIR)%.c
|
||||
$(CC) $(CFLAGS) -o $@ $<
|
||||
|
||||
run: $(BIN)
|
||||
./$(BIN)
|
||||
|
||||
clean:
|
||||
rm $(OBJECTS) $(BIN)
|
||||
|
||||
.PHONY: all clean run.
|
|
@ -0,0 +1,6 @@
|
|||
#ifndef ANALYZER_H
|
||||
#define ANALYZER_H
|
||||
|
||||
|
||||
|
||||
#endif//ANALYZER_H
|
|
@ -0,0 +1,6 @@
|
|||
#ifndef ASSEMBLING_H
|
||||
#define ASSEMBLING_H
|
||||
|
||||
|
||||
|
||||
#endif//ASSEMBLING_H
|
|
@ -0,0 +1,6 @@
|
|||
#ifndef TOKENIZER_H
|
||||
#define TOKENIZER_H
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#endif//TOKENIZER_H
|
|
@ -0,0 +1 @@
|
|||
#include "../include/analyzer.h"
|
|
@ -0,0 +1 @@
|
|||
#include "../include/assembling.h"
|
|
@ -0,0 +1,24 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#include "../include/analyzer.h"
|
||||
#include "../include/assembling.h"
|
||||
#include "../include/tokenizer.h"
|
||||
|
||||
/**
|
||||
* @name main
|
||||
* @return int
|
||||
* @brief Parse command line options and run compilation.
|
||||
*
|
||||
* @param int argc
|
||||
* @param char** argv
|
||||
*/
|
||||
int main (int argc, char** argv) {
|
||||
int rv = EXIT_SUCCESS;
|
||||
|
||||
/* check for right amount of cl arguments (1 filename at the moment) */
|
||||
if (argc != 2) {
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
#include "../include/tokenizer.h"
|
Loading…
Reference in New Issue