Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile: build fix #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
CC=clang
COPTS=-o x6502 -O3 -lpthread -Wall -lncurses
CC=gcc
COPTS=-o x6502 -O3 -Wall
LIBS=-lncurses -lpthread
DEBUGOPTS=-DDEBUG -O0 -g
PYTHON=python

Expand All @@ -9,7 +10,10 @@ debug-names.h: generate_debug_names.py opcodes.h
$(PYTHON) generate_debug_names.py > debug-names.h

release: debug-names.h *.c *.h
$(CC) $(COPTS) *.c
$(CC) $(COPTS) *.c $(LIBS)

debug: debug-names.h *.c *.h
$(CC) $(COPTS) $(DEBUGOPTS) *.c
$(CC) $(COPTS) $(DEBUGOPTS) *.c $(LIBS)

clean:
rm -f debug-names.h x6502
3 changes: 2 additions & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ Building and running x6502
To build x6502, just run `make' in the project root. You
will need clang and Python installed. To use gcc, change
the $(CC) var in the Makefile. No libraries beyond POSIX
libc are used. This will produce the x6502 binary.
libc are used except ncurses. This will produce the
x6502 binary.

x6502 takes the compiled 6502 object file as an
argument, and runs it until it encounters an EXT
Expand Down