~case/dbns

ref: 85d3c74215baa48cb2fd97d3c85ff6060e7c42b1 dbns/src/Makefile -rw-r--r-- 2.2 KiB
85d3c742Zerhyn SBC oopsie 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
CC ?= gcc
PREFIX ?= /usr/local/bin
DATA_PREFIX ?= /opt/dbns/db

MATH_LINK = -lm

DATA_FOLDERS = ../area ../clans ../classes ../councils ../deity ../doc ../gods \
	../houses ../planets ../races ../space ../system

C_FLAGS = -O2 -g3 -Wall -std=c99 ${DBUGFLG} ${TIME} ${REG}
L_FLAGS = ${MATH_LINK} -lz

O_FILES = act_comm.o act_info.o act_move.o act_obj.o act_wiz.o \
          board.o boards.o bounty.o build.o clans.o colorize.o comm.o \
          comments.o const.o db.o deity.o editor.o fight.o finger.o grub.o \
          handler.o hashstr.o hiscores.o house.o ibuild.o \
          interp.o magic.o makeobjs.o mapout.o marry.o \
          misc.o mpxset.o mud_comm.o mud_prog.o new_fun.o pfiles.o planes.o \
          planet.o player.o rare.o requests.o reset.o save.o \
          shops.o skills.o skills_android.o skills_dbs.o skills_genie.o \
          space.o special.o stat_obj.o tables.o update.o dns.o \
          sha256.o

C_FILES = act_comm.c act_info.c act_move.c act_obj.c act_wiz.c \
          board.c boards.c bounty.c build.c clans.c colorize.c comm.c \
          comments.c const.c db.c deity.c editor.c fight.c finger.c grub.c \
          handler.c hashstr.c hiscores.c house.c ibuild.c \
          interp.c magic.c makeobjs.c mapout.c marry.c \
          misc.c mpxset.c mud_comm.c mud_prog.c new_fun.c pfiles.c planes.c \
          planet.c player.c rare.c requests.c reset.c save.c \
          shops.c skills.c skills_android.c skills_dbs.c\
          space.c special.c stat_obj.c tables.c update.c dns.c skills_genie.c \
          sha256.c

H_FILES = mud.h bet.h board.h finger.h house.h pfiles.h rare.h utf8.h

all:
	@make dbns

dbns: ${O_FILES}
	${CC} ${L_FLAGS} -o dbnsd ${O_FILES}
	@chmod 755 dbnsd

install:
	@make dbns
	install -m 755 -g wheel -o root dbnsd ${PREFIX}/dbnsd

init:
	systemctl enable ../init/dbns.service

data:
	@\cp ${DATA_PREFIX}/system/hiscores.dat /tmp/hiscores.dat
	@\cp -R ${DATA_FOLDERS} ${DATA_PREFIX}
	@\cp /tmp/hiscores.dat ${DATA_PREFIX}/system/hiscores.dat
	@\sudo chown -R dbns {DATA_PREFIX}
	@\sudo chgrp -R dbns {DATA_PREFIX}

stop:
	systemctl stop../init/dbns.service

restart:
	systemctl restart dbns

.c.o: mud.h
	${CC} -c ${C_FLAGS} $<

clean:
	@\rm -f *.o dbnsd *~