Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PoroCYon
smol
Commits
a6c4c6f2
Commit
a6c4c6f2
authored
Feb 10, 2019
by
PoroCYon
Committed by
PoroCYon
Feb 27, 2019
Browse files
... and fix the Makefile to work again with code that uses main() instead of _start()
parent
d903ef2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
a6c4c6f2
...
...
@@ -37,9 +37,9 @@ ASFLAGS += -DUSE_INTERP -DALIGN_STACK
NASM
?=
nasm
PYTHON3
?=
python3
all
:
$(BINDIR)/hello $(BINDIR)/sdl
all
:
$(BINDIR)/hello
-crt
$(BINDIR)/sdl
-crt
LIBS
+=
-lSDL2
-lGL
#-lX11
LIBS
+=
$(
shell
pkg-config
--libs
sdl2
)
-lX11
#-lGL
clean
:
@
$(RM)
-vrf
$(OBJDIR)
$(BINDIR)
...
...
@@ -64,8 +64,15 @@ $(OBJDIR)/stub.%.o: $(OBJDIR)/symbols.%.asm $(SRCDIR)/header32.asm \
$(SRCDIR)/loader32.asm
$(NASM)
$(ASFLAGS)
$<
-o
$@
$(OBJDIR)/stub.%.start.o
:
$(OBJDIR)/symbols.%.start.asm $(SRCDIR)/header32.asm
\
$(SRCDIR)/loader32.asm
$(NASM)
$(ASFLAGS)
$<
-o
$@
$(BINDIR)/%
:
$(OBJDIR)/%.o $(OBJDIR)/stub.%.o $(BINDIR)/
$(LD)
-Map
=
$(BINDIR)
/
$*
.map
$(LDFLAGS_)
$(OBJDIR)
/
$*
.o
$(OBJDIR)
/stub.
$*
.o
-o
"
$@
"
$(BINDIR)/%-crt
:
$(OBJDIR)/%.start.o $(OBJDIR)/stub.%.start.o $(BINDIR)/
$(LD)
-Map
=
$(BINDIR)
/
$*
-crt
.map
$(LDFLAGS_)
$(OBJDIR)
/
$*
.start.o
$(OBJDIR)
/stub.
$*
.start.o
-o
"
$@
"
.PHONY
:
all clean
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment