Skip to content

Commit

Permalink
Merge pull request #258 from 0xcaff/martin/fix-build
Browse files Browse the repository at this point in the history
build library stub from separate file
  • Loading branch information
kiwidoggie committed Feb 22, 2024
2 parents 2d6c6ad + 2bd8df9 commit cd48023
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions samples/library_example/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ $(INTDIR)/%.o: $(PROJDIR)/%.c
$(INTDIR)/%.o: $(PROJDIR)/%.cpp
$(CCX) $(CXXFLAGS) -o $@ $<

$(INTDIR)/%.o.stub: $(PROJDIR)/%.c
$(INTDIR)/%.o.stub: $(PROJDIR)/%.stub.c
$(CC) -target x86_64-pc-linux-gnu -ffreestanding -nostdlib -fno-builtin -fPIC -c $(TOOLCHAIN)/include -o $@ $<

$(INTDIR)/%.o.stub: $(PROJDIR)/%.cpp
$(INTDIR)/%.o.stub: $(PROJDIR)/%.stub.cpp
$(CCX) -target x86_64-pc-linux-gnu -ffreestanding -nostdlib -fno-builtin -fPIC -c $(TOOLCHAIN)/include -o $@ $<

.PHONY: clean
Expand Down
4 changes: 4 additions & 0 deletions samples/library_example/library_example/lib.stub.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
int testLibraryFunction()
{
return 0;
}

0 comments on commit cd48023

Please sign in to comment.