GNUmakefile 1.38 KB
Newer Older
deuce's avatar
deuce committed
1
2
3
4
SRC_ROOT = ..
# Cross platform/compiler definitions
include $(SRC_ROOT)/build/Common.gmake	# defines clean and output directory rules

deuce's avatar
deuce committed
5
6
CFLAGS += $(XPDEV-MT_CFLAGS) $(CIOLIB-MT_CFLAGS)

7
ifeq ($(os),win32)
8
 OBJS	+=	$(MTOBJODIR)$(DIRSEP)SDL_win32_main$(OFILE)
9
10
 OBJS	+=	$(MTOBJODIR)$(DIRSEP)win32cio$(OFILE)
else
11
12
 OBJS	+=	$(MTOBJODIR)$(DIRSEP)curs_cio$(OFILE)
endif
deuce's avatar
deuce committed
13
14
15
ifdef NO_X
 CFLAGS	+=	-DNO_X
else
deuce's avatar
deuce committed
16
 OBJS	+=	$(MTOBJODIR)$(DIRSEP)x_events$(OFILE) \
deuce's avatar
deuce committed
17
			$(MTOBJODIR)$(DIRSEP)x_cio$(OFILE)
deuce's avatar
deuce committed
18
 NEED_BITMAP := 1
deuce's avatar
deuce committed
19
endif
20

deuce's avatar
deuce committed
21
ifdef WITH_SDL_AUDIO
22
 OBJS	+=	$(MTOBJODIR)$(DIRSEP)sdl_con$(OFILE)
deuce's avatar
deuce committed
23
 NEED_BITMAP := 1
deuce's avatar
deuce committed
24
25
else
 ifdef WITH_SDL
deuce's avatar
deuce committed
26
  NEED_BITMAP := 1
deuce's avatar
deuce committed
27
28
29
  OBJS	+=	$(MTOBJODIR)$(DIRSEP)sdl_con$(OFILE)
  OBJS	+=      $(MTOBJODIR)$(DIRSEP)sdlfuncs$(OFILE)
  ifeq ($(os),darwin)
30
   OBJS 	+=      $(MTOBJODIR)$(DIRSEP)SDLMain$(OFILE)
deuce's avatar
deuce committed
31
32
  endif
 endif
33
34
endif

35
ifeq ($(os),netbsd)
36
37
38
 ifndef USE_SYSTEM_CURSES
  CFLAGS	+=	-DN_CURSES_LIB
 endif
39
endif
deuce's avatar
deuce committed
40

deuce's avatar
deuce committed
41
42
43
ifdef NEED_BITMAP
 OBJS	+=	$(MTOBJODIR)$(DIRSEP)bitmap_con$(OFILE)
endif
44

deuce's avatar
deuce committed
45
# CIOLIB Library Link Rule
deuce's avatar
deuce committed
46
$(CIOLIB-MT_BUILD): $(MTOBJODIR) $(OBJS)
deuce's avatar
deuce committed
47
	@echo Creating $@ ...
deuce's avatar
deuce committed
48
49
	$(QUIET)$(AR) rc $@ $(OBJS)
	$(QUIET)$(RANLIB) $@
deuce's avatar
deuce committed
50

deuce's avatar
deuce committed
51
$(CIOLIB-MT_SHLIB_BUILD): $(MTOBJODIR) $(OBJS)
deuce's avatar
deuce committed
52
53
	@echo Creating $@
	$(QUIET)$(MKSHLIB) $(LDFLAGS) $(OBJS) $(SHLIBOPTS) -o $@
deuce's avatar
deuce committed
54
55
56
57

ifeq ($(os),darwin)
$(MTOBJODIR)$(DIRSEP)SDLMain$(OFILE): SDLMain.m
	@echo $(COMPILE_MSG) $<
deuce's avatar
deuce committed
58
	$(QUIET)$(CC) $(CFLAGS) $(CCFLAGS) -o $@ -c $<
deuce's avatar
deuce committed
59
60
endif