mac makefile instructions
This commit is contained in:
		
							
								
								
									
										18
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								Makefile
									
									
									
									
									
								
							| @@ -1,3 +1,9 @@ | |||||||
|  | # | ||||||
|  | ## | ||||||
|  | #  Take a note - you MUST set CGO_ENABLED to true for cross-compilation | ||||||
|  | ## | ||||||
|  | # | ||||||
|  | # | ||||||
| PROJECT_NAME := "alchemyst-go" | PROJECT_NAME := "alchemyst-go" | ||||||
| PKG := "lab.zaar.be/thefish/$(PROJECT_NAME)" | PKG := "lab.zaar.be/thefish/$(PROJECT_NAME)" | ||||||
| GO=$(shell which go) | GO=$(shell which go) | ||||||
| @@ -15,7 +21,7 @@ all: build test | |||||||
| #build: build.spec build.server | #build: build.spec build.server | ||||||
| build: distclean build.deps build.game | build: distclean build.deps build.game | ||||||
|  |  | ||||||
| build.game: build.game.linux64 build.game.win64 | build.game: build.game.linux64 build.game.win64 build.game.mac | ||||||
|  |  | ||||||
| build.deps: | build.deps: | ||||||
| 	GIT_SSL_NO_VERIFY=true $(GO) mod vendor | 	GIT_SSL_NO_VERIFY=true $(GO) mod vendor | ||||||
| @@ -36,13 +42,21 @@ build.game.win64: | |||||||
| 	strip $(DISTFOLDER)/game.exe && \ | 	strip $(DISTFOLDER)/game.exe && \ | ||||||
| 	cd $(DISTFOLDER) && zip -r ../$(PROJECT_NAME)-$(OS)-${PKG_VER}.zip . -x *.git* | 	cd $(DISTFOLDER) && zip -r ../$(PROJECT_NAME)-$(OS)-${PKG_VER}.zip . -x *.git* | ||||||
|  |  | ||||||
|  | build.game.mac: | ||||||
|  | 	cp $(CWD)/lib/mac/libBearLibTerminal.dylib $(DISTFOLDER) && \ | ||||||
|  | 	cp $(CWD)/config.json $(DISTFOLDER) && \ | ||||||
|  | 	cp -r $(CWD)/resources $(DISTFOLDER) && \ | ||||||
|  | 	OSXCROSS_NO_INCLUDE_PATH_WARNINGS=1 MACOSX_DEPLOYMENT_TARGET=10.6 CC=o64-clang CXX=o64-clang++ GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 $(GO) build -ldflags $(LDFLAGS) -o $(DISTFOLDER)/game $(CWD)/cmd/game/main.go && \ | ||||||
|  | 	strip $(DISTFOLDER)/game.exe && \ | ||||||
|  | 	cd $(DISTFOLDER) && zip -r ../$(PROJECT_NAME)-$(OS)-${PKG_VER}.zip . -x *.git* | ||||||
|  |  | ||||||
| test: | test: | ||||||
| 	$(GO) test -v $(go list ./... | grep -v /vendor/) | 	$(GO) test -v $(go list ./... | grep -v /vendor/) | ||||||
|  |  | ||||||
| distclean: | distclean: | ||||||
| 	#  find . ! -name '.gitkeep' ! -path 'linux64' ! -path 'win64' -exec rm -rf {} \; | 	#  find . ! -name '.gitkeep' ! -path 'linux64' ! -path 'win64' -exec rm -rf {} \; | ||||||
| 	cd $(CWD)/dist && find . -type f -not \( -name .gitkeep -o -name README \) -delete && \ | 	cd $(CWD)/dist && find . -type f -not \( -name .gitkeep -o -name README \) -delete && \ | ||||||
| 	find . -type d -not \( -name .gitkeep -o -name linux64 -o -name win64 \) -delete | 	find . -type d -not \( -name .gitkeep -o -name linux64 -o -name win64 -o -name mac\) -delete | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user