Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

GNUmakefile 1.69 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 8 9
# Deuce doesn't want to add "useless parens" in xbr.c
CFLAGS += -Wno-parentheses

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

25 26
ifdef WITH_SDL
 NEED_BITMAP := 1
27
 OBJS	+=	$(MTOBJODIR)$(DIRSEP)sdl_con$(OFILE)
28
 OBJS	+=      $(MTOBJODIR)$(DIRSEP)sdlfuncs$(OFILE)
29 30
endif

31
ifeq ($(os),netbsd)
32 33 34
 ifndef USE_SYSTEM_CURSES
  CFLAGS	+=	-DN_CURSES_LIB
 endif
35
endif
deuce's avatar
deuce committed
36

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

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

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

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

57 58 59 60 61 62 63
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
64
	$(QUIET)${WINDRES} $(WINDRESFLAGS) -O coff -i ciolib.rc -o $@
65
endif