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.59 KB
Newer Older
deuce's avatar
deuce committed
1 2
SRC_ROOT	:=	..
include ${SRC_ROOT}/build/Common.gmake
3

deuce's avatar
deuce committed
4 5
CFLAGS	+=	-I/usr/local/include	# cryptlib.h lives here by default

deuce's avatar
deuce committed
6
ifeq ($(os),sunos)    # Solaris
deuce's avatar
deuce committed
7
 LDFLAGS += -lnsl -lrt -lcurses -ldl
deuce's avatar
deuce committed
8 9 10
 CFLAGS	+=	-DNEED_CFMAKERAW
endif

11 12 13 14 15
ifdef USE_GUTS
 CFLAGS +=	-I../guts -DGUTS_BUILTIN
 OBJS	+=	$(MTOBJODIR)$(DIRSEP)gutsz$(OFILE)
endif

deuce's avatar
deuce committed
16 17 18 19
ifdef PREFIX
 CFLAGS	+=	-DPREFIX=\"${PREFIX}\"
endif

deuce's avatar
deuce committed
20
CFLAGS	+=	$(UIFC-MT_CFLAGS) $(CIOLIB-MT_CFLAGS) $(XPDEV-MT_CFLAGS) -I../sbbs3 -I../smblib -I../comio
deuce's avatar
deuce committed
21 22
LDFLAGS	+=	$(UIFC-MT_LDFLAGS) $(CIOLIB-MT_LDFLAGS) $(XPDEV-MT_LDFLAGS)

deuce's avatar
deuce committed
23
vpath %.c ../sbbs3 ../smblib ../uifc ../guts ../comio
24

deuce's avatar
deuce committed
25
INSTALL_EXE	?=	install
26
INSTALL_DATA	?=	install -m 0444
deuce's avatar
deuce committed
27

deuce's avatar
deuce committed
28
$(SYNCTERM): $(EXEODIR) $(OBJS) $(BUILD_DEPENDS)
29
	@echo Linking $@
deuce's avatar
deuce committed
30
	${QUIET}$(CC) $(LDFLAGS) $(MT_LDFLAGS) $(OBJS) -o $@ $(UIFC-MT_LIBS) $(CIOLIB-MT_LIBS) $(XPDEV-MT_LIBS)
31

deuce's avatar
deuce committed
32 33 34
install: $(SYNCTERM)
	@echo Installing...
	${INSTALL_EXE} ${SYNCTERM} ${PREFIX}/bin
35
	${INSTALL_DATA} syncterm.png ${PREFIX}/share/icons/hicolor/64x64/apps
deuce's avatar
deuce committed
36
	${INSTALL_DATA} syncterm.desktop ${PREFIX}/share/applications
deuce's avatar
deuce committed
37

38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
devel: tags cscope.out

cscope.out: cscope.files
	cscope -b

tags: cscope.files
	exctags -VL cscope.files

cscope.files::
	find . ../conio ../uifc ../xpdev -name '*.c' -o -name '*.cpp' -o -name '*.h' > cscope.files
	echo ../sbbs3/telnet.c >> cscope.files
	echo ../sbbs3/telnet.h >> cscope.files
	echo ../sbbs3/zmodem.c >> cscope.files
	echo ../sbbs3/zmodem.h >> cscope.files
	echo ../sbbs3/xmodem.h >> cscope.files
	echo ../smblib/crc16.c >> cscope.files
	echo ../smblib/crc16.h >> cscope.files
	echo ../smblib/crc32.c >> cscope.files
	echo ../smblib/crc32.h >> cscope.files