GNUmakefile 1.65 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
7
CFLAGS += $(XPDEV-MT_CFLAGS) $(CIOLIB-MT_CFLAGS)

OBJS	+=	$(MTOBJODIR)$(DIRSEP)curs_cio$(OFILE)
deuce's avatar
deuce committed
8
9
10
ifdef NO_X
 CFLAGS	+=	-DNO_X
else
deuce's avatar
deuce committed
11
12
 OBJS	+=	$(MTOBJODIR)$(DIRSEP)console$(OFILE) \
			$(MTOBJODIR)$(DIRSEP)x_cio$(OFILE)
deuce's avatar
deuce committed
13
endif
14

deuce's avatar
deuce committed
15
ifdef WITH_SDL_AUDIO
16
 OBJS	+=	$(MTOBJODIR)$(DIRSEP)sdl_con$(OFILE)
deuce's avatar
deuce committed
17
18
19
20
21
22
23
24
25
else
 ifdef WITH_SDL
  OBJS	+=	$(MTOBJODIR)$(DIRSEP)sdl_con$(OFILE)
  OBJS	+=      $(MTOBJODIR)$(DIRSEP)sdlfuncs$(OFILE)
  ifeq ($(os),darwin)
   MTOBJS	+=      $(MTOBJODIR)$(DIRSEP)SDLMain$(OFILE)
   OBJS 	+=      $(OBJODIR)$(DIRSEP)SDLMain$(OFILE)
  endif
 endif
26
27
endif

28
ifeq ($(os),netbsd)
29
30
31
 ifndef USE_SYSTEM_CURSES
  CFLAGS	+=	-DN_CURSES_LIB
 endif
32
endif
deuce's avatar
deuce committed
33

34
35
$(MTOBJODIR)$(DIRSEP)console$(OFILE).static:
	$(QUIET)$(DELETE) $(MTOBJODIR)$(DIRSEP)console$(OFILE)*
36
	$(QUIET)touch $(MTOBJODIR)$(DIRSEP)console$(OFILE).static
37
38
39
40
41

$(MTOBJODIR)$(DIRSEP)console$(OFILE).dynamic:
	$(QUIET)$(DELETE) $(MTOBJODIR)$(DIRSEP)console$(OFILE)*
	$(QUIET)touch $(MTOBJODIR)$(DIRSEP)console$(OFILE).dynamic

deuce's avatar
deuce committed
42
# CIOLIB Library Link Rule
43
44
45
46
47
ifdef STATIC
$(CIOLIB-MT_BUILD): $(MTOBJODIR)$(DIRSEP)console$(OFILE).static $(MTOBJODIR) $(OBJS)
else
$(CIOLIB-MT_BUILD): $(MTOBJODIR)$(DIRSEP)console$(OFILE).dynamic $(MTOBJODIR) $(OBJS)
endif
deuce's avatar
deuce committed
48
	@echo Creating $@ ...
deuce's avatar
deuce committed
49
50
	$(QUIET)$(AR) rc $@ $(OBJS)
	$(QUIET)$(RANLIB) $@
deuce's avatar
deuce committed
51
52
53
54
55
56
57
58

ifdef STATIC
$(CIOLIB-MT_SHLIB_BUILD): $(MTOBJODIR)$(DIRSEP)console$(OFILE).static $(MTOBJODIR) $(OBJS)
else
$(CIOLIB-MT_SHLIB_BUILD): $(MTOBJODIR)$(DIRSEP)console$(OFILE).dynamic $(MTOBJODIR) $(OBJS)
endif
	@echo Creating $@
	$(QUIET)$(MKSHLIB) $(LDFLAGS) $(OBJS) $(SHLIBOPTS) -o $@