Skip to content

Commit

Permalink
sim: Added makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
agkaminski committed May 8, 2018
1 parent 43c1926 commit 7e74def
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions simulator/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CC=gcc
CFLAGS=-Wall -Werror -O2 -ansi -std=gnu99
LIBS=-lpthread

OUT = sim
OBJ = addrmode.o alu.o bus.o core.o decoder.o exec.o main.o memory.o serial.o

%.o: %.c
$(CC) -c -o $@ $< $(CFLAGS)

$(OUT): $(OBJ)
gcc -o $@ $^ $(CFLAGS) $(LIBS)

.PHONY: clean

clean:
rm -f *.o $(OUT)
2 changes: 1 addition & 1 deletion simulator/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ int main(int argc, char *argv[])

while (1) {
core_step();
thread_sleep(1000);
thread_sleep(1000000);
}

return 0;
Expand Down

0 comments on commit 7e74def

Please sign in to comment.