summaryrefslogtreecommitdiff
path: root/PcsxSrc/Linux/Makefile
diff options
context:
space:
mode:
authorPixel <Pixel>2002-09-21 18:47:46 +0000
committerPixel <Pixel>2002-09-21 18:47:46 +0000
commit60c1003845035ad4cd0e9ea50862bad7626faf0e (patch)
treecf3f6e0015ede7b11112de87914734c02616dfa4 /PcsxSrc/Linux/Makefile
parent259110b90336240ce6cdde0201d05ce03a1f73fe (diff)
Added the Pcsx source.
Diffstat (limited to 'PcsxSrc/Linux/Makefile')
-rw-r--r--PcsxSrc/Linux/Makefile62
1 files changed, 62 insertions, 0 deletions
diff --git a/PcsxSrc/Linux/Makefile b/PcsxSrc/Linux/Makefile
new file mode 100644
index 0000000..bbf1b70
--- /dev/null
+++ b/PcsxSrc/Linux/Makefile
@@ -0,0 +1,62 @@
+#
+# PCSX Makefile for Linux
+#
+
+MAJ = 1
+MIN = 3
+VERSION = ${MAJ}.${MIN}
+
+all: pcsx
+
+CPU = ix86
+
+CC = gcc
+NASM = nasm
+RM = rm -f
+STRIP = strip
+
+OPTIMIZE = -O2 -fomit-frame-pointer -finline-functions -ffast-math
+FLAGS = -D__LINUX__ -DPCSX_VERSION=\"${VERSION}\"
+# this includes the option -rdynamic and we don't want that
+LIBST = $(shell gtk-config --libs)
+LIBS = $(subst -rdynamic, , ${LIBST}) -lz
+
+OBJS = ../PsxBios.o ../CdRom.o ../PsxCounters.o ../PsxDma.o ../DisR3000A.o \
+ ../Spu.o ../Sio.o ../PsxHw.o ../Mdec.o ../PsxMem.o ../Misc.o \
+ ../plugins.o ../Decode_XA.o ../R3000A.o ../PsxInterpreter.o \
+ ../Gte.o ../PsxHLE.o
+OBJS+= LnxMain.o Plugin.o Config.o GtkGui.o
+OBJS+= GladeGui.o GladeFuncs.o #GladeCalls.o
+
+ifeq (${CPU}, ix86)
+ CC = pgcc
+ OPTIMIZE = -O4 -fomit-frame-pointer -finline-functions -ffast-math -fno-exceptions -march=pentiumpro
+ OBJS+= ../ix86/iR3000A.o ../ix86/ix86.o
+ FLAGS+= -D__i386__
+endif
+
+CFLAGS = -Wall ${OPTIMIZE} -I. -I.. -I/usr/include/g++ ${FLAGS}
+CFLAGS+= $(shell gtk-config --cflags)
+ASMFLAGS = -f elf ${FLAGS} -i./ -i../
+
+pcsx: ${OBJS}
+ ${CC} ${CFLAGS} ${OBJS} -o pcsx ${LIBS}
+ ${STRIP} pcsx
+
+.PHONY: clean pcsx
+
+clean:
+ ${RM} *.o ../*.o ../${CPU}/*.o pcsx
+
+../%.o: ../%.c
+ ${CC} ${CFLAGS} -c -o $@ $<
+
+../${CPU}/%.o: ../${CPU}/%.asm
+ ${NASM} ${ASMFLAGS} -o $@ $<
+
+%.o: %.c
+ ${CC} ${CFLAGS} -c -o $@ $<
+
+../Cpu/ix86/%.o: ../Cpu/ix86/%.c
+ ${CC} ${CFLAGS} -c -o $@ $<
+