GNUmakefile 1.61 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

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

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

22 23
ifdef WITH_SDL
 NEED_BITMAP := 1
24
 OBJS	+=	$(MTOBJODIR)$(DIRSEP)sdl_con$(OFILE)
25
 OBJS	+=      $(MTOBJODIR)$(DIRSEP)sdlfuncs$(OFILE)
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

deuce's avatar
deuce committed
34
ifeq ($(shell if [ -e /usr/include/ncursesw/ncurses.h ] ; then echo YES ; fi),YES)
35 36 37
 CFLAGS += -DDEBIAN_HATES_YOU
endif

deuce's avatar
deuce committed
38
ifdef NEED_BITMAP
Deucе's avatar
Deucе committed
39 40 41
 OBJS	+=	$(MTOBJODIR)$(DIRSEP)bitmap_con$(OFILE)
 OBJS	+=	$(MTOBJODIR)$(DIRSEP)scale$(OFILE)
 OBJS	+=	$(MTOBJODIR)$(DIRSEP)xbr$(OFILE)
deuce's avatar
deuce committed
42
endif
43

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

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

54 55 56 57 58 59 60
ifeq ($(os),win32)
mtlib: $(MTOBJODIR)$(DIRSEP)ciolib_res${OFILE}

dl-mtlib: $(MTOBJODIR)$(DIRSEP)ciolib_res${OFILE}

$(MTOBJODIR)$(DIRSEP)ciolib_res${OFILE}: ciolib.rc syncicon64.ico
	@echo Creating $< ...
Deucе's avatar
Deucе committed
61
	$(QUIET)${WINDRES} $(WINDRESFLAGS) -O coff -i ciolib.rc -o $@
62
endif