GNUmakefile 1.5 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
deuce's avatar
deuce committed
17
 OBJS	+=	$(MTOBJODIR)$(DIRSEP)x_events$(OFILE) \
deuce's avatar
deuce committed
18
			$(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
39
40
ifdef NEED_BITMAP
 OBJS	+=	$(MTOBJODIR)$(DIRSEP)bitmap_con$(OFILE)
endif
41

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

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

52
53
54
55
56
57
58
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 $< ...
59
	$(QUIET)${WINDRES} -O coff -i ciolib.rc -o $@
60
endif