Skip to content

Commit

Permalink
All necessary changes to compile on Ubuntu.
Browse files Browse the repository at this point in the history
  • Loading branch information
TrashRaccoonSnuffy committed Sep 8, 2023
1 parent 09287dd commit 5265da3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ parsegen
win/confloc.h
zsnes
zsnes.exe
usr
16 changes: 5 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ CC ?= gcc
CXX ?= g++

# TODO: FreeBSD has a patch for being able to build without -fcommon
CFLAGS += -m32 -pthread -no-pie -std=gnu99 -fcommon -O1 -march=pentium-mmx -fno-inline -fno-pic -mtune=generic -mmmx -D_FORTIY_SOURCE=2 -L/usr/lib32 -mno-sse -mno-sse2 -ffunction-sections -fdata-sections -Wfatal-errors -w
CXXFLAGS += -m32 -pthread -no-pie -std=gnu++14 -O1 -march=pentium-mmx -fno-inline -fno-pic -mtune=generic -mmmx -D_FORTIFY_SOURCE=2 -L/usr/lib32 -mno-sse -mno-sse2 -ffunction-sections -fdata-sections -Wfatal-errors -w
LDFLAGS += -Wl,--as-needed -no-pie -L/usr/lib32 -Wl,--gc-sections -lz
CFLAGS += -m32 -pthread -no-pie -std=gnu99 -fcommon -O1 -march=pentium-mmx -fno-inline -fno-pic -mtune=generic -mmmx -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -L./usr/lib -mno-sse -mno-sse2 -ffunction-sections -fdata-sections -Wfatal-errors -w
CXXFLAGS += -m32 -pthread -no-pie -std=gnu++14 -O1 -march=pentium-mmx -fno-inline -fno-pic -mtune=generic -mmmx -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -L./usr/lib -mno-sse -mno-sse2 -ffunction-sections -fdata-sections -Wfatal-errors -w
LDFLAGS += -Wl,--as-needed -no-pie -L./usr/lib -Wl,--gc-sections -lz
# -O1 is mandatory
ASMFLAGS += -O1 -w-orphan-labels

#WITH_AO := yes
#WITH_DEBUGGER := yes
WITH_JMA := yes
#WITH_JMA := yes
WITH_OPENGL := yes
WITH_PNG := yes
#WITH_PNG := yes
WITH_SDL := yes

BINARY ?= zsnes
Expand Down Expand Up @@ -83,12 +83,6 @@ else
CFGDEFS += -DNO_AO
endif

ifeq ($(wildcard /usr/lib/i386-linux-gnu/.),)
CFLAGS += -I/usr/include/x86_64-linux-gnu -I /usr/include/X11
CXXFLAGS += -I/usr/include/x86_64-linux-gnu -I /usr/include/X11
LDFLAGS = -Wl,--as-needed -no-pie -L/usr/lib32 -L/usr/lib/i386-linux-gnu -Wl,--gc-sections -lz -lSDL-1.2 -lpng16 -lX11
endif

SRCS :=
SRCS += c_init.c
SRCS += c_vcache.c
Expand Down

0 comments on commit 5265da3

Please sign in to comment.