summaryrefslogtreecommitdiff
path: root/build/q2pro.mk
blob: cbaf75358fc511d8ef40cc5332678174ad931dc1 (plain)
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# -----------------------------
# q2pro makefile by [SkulleR]
# -----------------------------

include ../config.mk

TARGET=$(OUTDIR)/q2pro$(EXESUFFIX)

LDFLAGS+=-lm

SRCFILES=cmd.c cmodel.c common.c prompt.c crc.c cvar.c \
	files.c mdfour.c net_common.c net_chan.c pmove.c sv_ccmds.c 	\
	sv_ents.c sv_game.c sv_init.c sv_main.c sv_send.c	\
	sv_user.c sv_world.c sv_mvd.c sv_http.c \
	mvd_client.c mvd_parse.c mvd_game.c \
	q_msg.c q_shared.c q_uis.c q_field.c q_lex.c	\
	m_flash.c cl_demo.c cl_draw.c cl_ents.c cl_fx.c cl_input.c	\
	cl_locs.c cl_main.c cl_newfx.c cl_parse.c cl_pred.c cl_ref.c	\
	cl_scrn.c cl_tent.c cl_ui.c cl_view.c cl_console.c cl_keys.c		\
	snd_main.c snd_mem.c snd_mix.c

ifdef REF_HARD_LINKED

SRCFILES+=r_images.c  \
	   r_bsp.c \
	   gl_draw.c   \
	   gl_images.c  \
	   gl_models.c \
	   gl_world.c \
	   gl_mesh.c \
	   gl_main.c  \
	   gl_state.c  \
	   gl_surf.c  \
	   gl_tess.c   \
	   gl_sky.c   \
	   qgl_api.c

ifdef USE_JPEG
LDFLAGS+=$(JPEG_LDFLAGS)
CFLAGS+=$(JPEG_CFLAGS)
endif

ifdef USE_PNG
LDFLAGS+=$(PNG_LDFLAGS)
CFLAGS+=$(PNG_CFLAGS)
endif

endif #REF_HARD_LINKED

ifdef UI_HARD_LINKED

SRCFILES+=ui_addressbook.c \
	ui_atoms.c \
	ui_confirm.c \
	ui_controls.c \
	ui_credits.c \
	ui_demos.c \
	ui_dmoptions.c \
	ui_download.c \
	ui_game.c \
	ui_ingame.c \
	ui_interface.c \
	ui_keys.c \
	ui_loadgame.c \
	ui_loading.c \
	ui_main.c \
	ui_menu.c \
	ui_mods.c \
	ui_multiplayer.c \
	ui_network.c \
	ui_options.c \
	ui_playerconfig.c \
	ui_playermodels.c \
	ui_savegame.c \
	ui_startserver.c \
	ui_video.c

endif # UI_HARD_LINKED

ifdef USE_ZLIB
SRCFILES+=ioapi.c unzip.c 
LDFLAGS+=$(ZLIB_LDFLAGS)
CFLAGS+=$(ZLIB_CFLAGS)
endif

ifdef USE_ASM
ASMFILES+=snd_mixa.s math.s
endif

ifdef MINGW

SRCFILES+=sys_win.c vid_win.c win_glimp.c win_wgl.c

ifndef REF_HARD_LINKED
SRCFILES+=win_swimp.c
endif

ifdef USE_WAVE
SRCFILES+=snd_wave.c
endif

ifdef USE_DSOUND
SRCFILES+=snd_dx.c
endif

ifdef USE_DINPUT
SRCFILES+=in_dx.c
endif

LDFLAGS+=-mwindows -lws2_32 -lwinmm

RESFILES=q2pro.rc

else # MINGW

SRCFILES+=sys_unix.c

ifdef USE_OSS
SRCFILES+=snd_oss.c
endif

ifdef USE_EVDEV
SRCFILES+=in_evdev.c
endif

ASMFILES+=snd_mixa.s
LDFLAGS+=-ldl

ifdef USE_SDL
SRCFILES+=vid_sdl.c snd_sdl.c
CFLAGS+=$(SDL_CFLAGS)
LDFLAGS+=-lX11 $(SDL_LDFLAGS)
endif

endif # !MINGW

include $(SRCDIR)/build/target.mk