1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
--- makefile.orig Sun Apr 18 18:02:24 2004
+++ makefile Mon Sep 19 20:44:29 2005
@@ -260,12 +260,10 @@
# gcc or g++
#CC=@gcc
-CC=gcc
#if use PGCC or EGCS
PGCC=1
-WFLAGS=-Wall # -W -Wno-unused -Wno-sign-compare
#uncomment if you want to use the POLL_POINTER hack
#POLL_POINTER=-DPOLL_POINTER
@@ -407,7 +405,8 @@
OPTS := $(OPTS) -DVID_X11 $(POLL_POINTER) -I. -I/usr/X11R6/include
LDFLAGS=-L/usr/X11R6/lib
- LIBS=-lXext -lX11 -lm -lXxf86vm -lipx -lkvm -pthread
+ LIBS=-lXext -lX11 -lm -lXxf86vm -lipx -lkvm ${PTHREAD_LIBS}
+ CFLAGS+=${PTHREAD_CFLAGS}
# name of the exefile
EXENAME=llxdoom
SFLAGS=-g $(OPTS)
@@ -418,7 +417,7 @@
else #ifdef X
ifdef FBSD_SDL
INTERFACE=sdl
- OPTS := -DLINUX -DFREEBSD -DHWRENDER -DDIRECTFULLSCREEN -DHAVE_MIXER -DSDL -DVID_X11 $(POLL_POINTER) -I. -I/usr/local/include/SDL11 -I/usr/X11R6/include -Wall
+ OPTS := -DLINUX -DFREEBSD -DHWRENDER -DDIRECTFULLSCREEN -DHAVE_MIXER -DSDL -DVID_X11 $(POLL_POINTER) -I. -I/usr/local/include/SDL11 -I/usr/X11R6/include
SFLAGS=-g $(OPTS)
OBJS=$(O)/i_video.o $(O)/dosstr.o $(O)/endtxt.o \
$(O)/hw_bsp.o $(O)/hw_draw.o $(O)/hw_light.o $(O)/hw_main.o \
@@ -428,7 +427,8 @@
DEBUGLIBS=$(LIBS)
LDFLAGS=-L/usr/X11R6/lib -L/usr/local/lib
- LIBS=-lm -lSDL-1.1 -lSDL_mixer -lGL -lGLU -lipx -lkvm -pthread
+ LIBS=-lm -lSDL-1.1 -lSDL_mixer -lGL -lGLU -lipx -lkvm ${PTHREAD_LIBS}
+ CFLAGS+=${PTHREAD_CFLAGS}
DEBUGLIBS=$(LIBS)
# name of the exefile
@@ -533,11 +533,7 @@
ifndef SOLARIS
ifdef GCC30
- M5=-march=pentium
- M4=-march=486
else
- M5=-mpentium
- M4=-m486
endif
endif
@@ -555,13 +551,13 @@
# build a normal optimised version
ifdef PGCC
- CFLAGS = $(OPTS) $(M5) -O6 -ffast-math -fomit-frame-pointer -fwritable-strings
+ CFLAGS += $(OPTS)
# -fgcse -fcse-follow-jumps -fcse-skip-blocks -frerun-cse-after-loop -ffunction-cse \
# -fexpensive-optimizations -fforce-mem -fstrength-reduce -fthread-jumps \
# -fregmove -fschedule-insns -fschedule-insns2 -fmove-all-movables \
# -fcaller-saves -finline-functions -mieee-fp -mfp-ret-in-387 -m80387 -mhard-float -finline
else
- CFLAGS = $(M4) -O3 -ffast-math -fomit-frame-pointer -fwritable-strings $(OPTS)
+ CFLAGS += $(OPTS)
endif
endif
@@ -735,7 +731,7 @@
#dll
dll : $(O)/r_opengl.o $(O)/ogl_x11.o
- $(CC) $(M5) -O6 -o $(BIN)/r_opengl.so -shared -nostartfiles $(O)/r_opengl.o $(O)/ogl_x11.o -L/usr/X11R6/lib -L/usr/local/lib -lX11 -lXext -lGL -lGLU -lm
+ $(CC) $(CFLAGS) -o $(BIN)/r_opengl.so -shared -nostartfiles $(O)/r_opengl.o $(O)/ogl_x11.o -L/usr/X11R6/lib -L/usr/local/lib -lX11 -lXext -lGL -lGLU -lm
musserv:
@mkdir -p $(MUSSERV)/linux
@@ -760,7 +756,7 @@
ifdef FREEBSD
ifdef FBSD_SDL
$(O)/r_opengl.o: hardware/r_opengl/r_opengl.c hardware/r_opengl/r_opengl.h
- $(CC) $(CFLAGS) $(LDFLAGS) $(WFLAGS) -I/usr/X11R6/include -c $< -o $@
+ $(CC) -fPIC $(CFLAGS) $(LDFLAGS) $(WFLAGS) -I/usr/X11R6/include -c $< -o $@
else #FBSD_SDL
$(O)/r_opengl.o: hardware/r_opengl/r_opengl.c hardware/r_opengl/r_opengl.h
$(CC) $(M5) -O6 -o $(O)/r_opengl.o -DHWRENDER -DVID_X11 -DLINUX -DFREEBSD $(POLL_POINTER) -shared -nostartfiles -I/usr/X11R6/include -c hardware/r_opengl/r_opengl.c
@@ -777,7 +773,7 @@
$(CC) $(M5) -O6 -o $(O)/ogl_x11.o -DHWRENDER -DVID_X11 -DLINUX $(POLL_POINTER) -shared -nostartfiles -I/usr/X11R6/include -c hardware/r_opengl/ogl_x11.c
else
$(O)/ogl_x11.o: hardware/r_opengl/ogl_x11.c hardware/r_opengl/r_opengl.h
- $(CC) $(M5) -O6 -o $(O)/ogl_x11.o -DHWRENDER -DVID_X11 -DLINUX -DFREEBSD $(POLL_POINTER) -shared -nostartfiles -I/usr/X11R6/include -c hardware/r_opengl/ogl_x11.c
+ $(CC) -fPIC $(CFLAGS) -o $(O)/ogl_x11.o -DHWRENDER -DVID_X11 -DLINUX -DFREEBSD $(POLL_POINTER) -shared -nostartfiles -I/usr/X11R6/include -c hardware/r_opengl/ogl_x11.c
endif
|