Skip to content

Commit

Permalink
Add makefile and compile command for macos
Browse files Browse the repository at this point in the history
  • Loading branch information
aki-cat committed Sep 12, 2018
1 parent 73c5f7a commit 0aa4637
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ steam_appid.txt
# .nfs files are created when an open file is removed but is still being accessed
.nfs*

# Vim temp files
*.swp

### Lua ###
# Compiled Lua sources
luac.out
Expand Down
26 changes: 26 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

SRC=luasteam.cxx
STDLIB_VER=-std=c++11

OSX_OUT=steam.so
OSX_IPATHS=-I/usr/local/include/luajit-2.0
OSX_LPATHS=-L./lib/osx32 -lsteam_api -L/usr/local/lib -lluajit-5.1
OSX_FLAGS=$(OSX_IPATHS) $(OSX_LPATHS) $(STDLIB_VER)

GNU_OUT=steam.so
GNU_IPATHS=-I/usr/include/luajit-2.0
GNU_LPATHS=-L./lib/linux64 -lsteam_api -L/usr/lib/x86_64-linux-gnu -lluajit-5.1
GNU_FLAGS=$(OSX_IPATHS) $(GNU_LPATHS) $(STDLIB_VER)


.PHONY: all osx gnu

all:
@echo "choose platform: osx | linux"

osx:
$(CXX) $(SRC) -o $(OSX_OUT) -shared -fPIC $(OSX_FLAGS)

gnu:
$(CXX) $(SRC) -o $(GNU_OUT) -shared -fPIC $(GNU_FLAGS)

0 comments on commit 0aa4637

Please sign in to comment.