This commit is contained in:
Yannick Reiß 2023-09-20 19:39:31 +02:00
parent 47f2cde673
commit 3a9ec5ecfe
No known key found for this signature in database
GPG Key ID: 5A3AF456F0A0338C
8 changed files with 69 additions and 0 deletions

24
bfpcompiler/Makefile Normal file
View File

@ -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.

View File

@ -0,0 +1,6 @@
#ifndef ANALYZER_H
#define ANALYZER_H
#endif//ANALYZER_H

View File

@ -0,0 +1,6 @@
#ifndef ASSEMBLING_H
#define ASSEMBLING_H
#endif//ASSEMBLING_H

View File

@ -0,0 +1,6 @@
#ifndef TOKENIZER_H
#define TOKENIZER_H
#include <string.h>
#endif//TOKENIZER_H

View File

@ -0,0 +1 @@
#include "../include/analyzer.h"

View File

@ -0,0 +1 @@
#include "../include/assembling.h"

View File

@ -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;
}

View File

@ -0,0 +1 @@
#include "../include/tokenizer.h"