Add static build support

This commit allows for building statically linked 86Box binaries.
Statically linked 86Box binaries do not need additional DLL files, which
improves user-friendliness significantly.
This commit is contained in:
Yvan Janssens
2019-09-03 08:58:35 +01:00
parent 8243df99e5
commit 6b4d000993

View File

@@ -638,9 +638,15 @@ OBJ += $(EXOBJ)
endif
LIBS := -mwindows \
-lopenal.dll \
-lddraw -ldxguid -ld3d9 \
-lcomctl32 -lwinmm
ifeq ($(STATIC), y)
LIBS += -lopenal -lole32
else
LIBS += -lopenal.dll
endif
ifeq ($(D2D), y)
LIBS += $(D2DLIB)
endif
@@ -667,6 +673,10 @@ ifeq ($(D3DX), y)
LIBS += -ld3dx9
endif
ifeq ($(STATIC), y)
LIBS += -static
endif
# Build module rules.
ifeq ($(AUTODEP), y)
%.o: %.c