cross platform build of server and Musique
This commit is contained in:
parent
3f0014bb2c
commit
a56731085d
@ -3,7 +3,8 @@ Release_Obj=$(addprefix bin/$(os)/,$(Obj))
|
|||||||
Server=bin/$(os)/server/server.h bin/$(os)/server/server.o
|
Server=bin/$(os)/server/server.h bin/$(os)/server/server.o
|
||||||
|
|
||||||
$(Server) &: server/src/*.go
|
$(Server) &: server/src/*.go
|
||||||
cd server/src/; go build -o ../../bin/$(os)/server/server.o -buildmode=c-archive
|
cd server/src/; GOOS="$(GOOS)" GOARCH="$(GOARCH)" CGO_ENABLED=1 CC="$(CC)" \
|
||||||
|
go build -o ../../bin/$(os)/server/server.o -buildmode=c-archive
|
||||||
|
|
||||||
bin/$(os)/bestline.o: lib/bestline/bestline.c lib/bestline/bestline.h
|
bin/$(os)/bestline.o: lib/bestline/bestline.c lib/bestline/bestline.h
|
||||||
@echo "CC $@"
|
@echo "CC $@"
|
||||||
|
@ -4,3 +4,5 @@ CPPFLAGS:=$(CPPFLAGS) -D __LINUX_ALSA__
|
|||||||
LDLIBS:=-lasound $(LDLIBS) -static-libgcc -static-libstdc++
|
LDLIBS:=-lasound $(LDLIBS) -static-libgcc -static-libstdc++
|
||||||
Bestline=bin/$(os)/bestline.o
|
Bestline=bin/$(os)/bestline.o
|
||||||
Target=musique
|
Target=musique
|
||||||
|
GOOS=linux
|
||||||
|
GOARCH=amd64
|
||||||
|
@ -5,3 +5,5 @@ LDLIBS:=-framework CoreMIDI -framework CoreAudio -framework CoreFoundation $(LDL
|
|||||||
Release_Obj=$(addprefix bin/,$(Obj))
|
Release_Obj=$(addprefix bin/,$(Obj))
|
||||||
Bestline=bin/$(os)/bestline.o
|
Bestline=bin/$(os)/bestline.o
|
||||||
Target=musique
|
Target=musique
|
||||||
|
GOOS=darwin
|
||||||
|
GOARCH=amd64
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
CC=i686-w64-mingw32-gcc
|
CC=x86_64-w64-mingw32-cc
|
||||||
CXX=i686-w64-mingw32-g++
|
CXX=x86_64-w64-mingw32-c++
|
||||||
CPPFLAGS:=$(CPPFLAGS) -D__WINDOWS_MM__
|
CPPFLAGS:=$(CPPFLAGS) -D__WINDOWS_MM__
|
||||||
LDLIBS:=-lwinmm $(LDLIBS) -static-libgcc -static-libstdc++ -static
|
LDLIBS:=-lwinmm $(LDLIBS) -static-libgcc -static-libstdc++ -static
|
||||||
Target=musique.exe
|
Target=musique.exe
|
||||||
|
GOOS=windows
|
||||||
|
GOARCH=amd64
|
||||||
|
Loading…
Reference in New Issue
Block a user