[go: up one dir, main page]

Menu

[897c37]: / modules / Makefile  Maximize  Restore  History

Download this file

125 lines (93 with data), 2.1 kB

  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
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#
# LPC modules Makefile
#
# Builds a bunch of .so modules for corresponding LPC files
# (LPC files should be compiled too really)
#
# Requires "gnumake"
#
# $Id: Makefile,v 1.12 2012/06/10 13:06:37 dredd Exp $
#
# $Source: /cvsroot/swlpc/swlpc/modules/Makefile,v $
# $Revision: 1.12 $
# $Date: 2012/06/10 13:06:37 $
# $State: Exp $
#
# Author: Geoff Wong
# Copyright (C) 1996, 1997 Geoff Wong
# geoff@cs.rmit.edu.au
#
# This Makefile messes up dependency checking (-MM) because
# it's looking for depencies on obj/<sys>/<file>.o instead of <file.o>
# which is how the dependencies are given in .depend
#
include ../swlpc.mk
# Target Name
TARGET=dummy
MUDLIB=../mudlib
#
# Some operating system dependent trickery
#
OBJPATH=.
VPATH=$(OBJPATH)
#
# Compiler Stuff
#
INCLUDE=-I../lpvm -I/usr/include/x86_64-linux-gnu
#
# The modules source
#
# crypt.c \
#
SRC = \
crypt.c \
math.c \
misc.c \
string.c \
os.c \
regexp.c \
socket.c \
network.c \
disass.c \
ed.c
# mysql.c \
#
# Define the object code
#
OBJ := $(SRC:%.c=$(OBJPATH)/%.o)
SOBJ := $(SRC:%.c=$(OBJPATH)/%.so)
#
# Find local headers
#
HDRS := $(shell echo *.h)
$(OBJPATH)/%.o: %.c
$(CC) $(PROF) -c $(CFLAGS) $(DEFS) $(INCLUDE) $< -o $@
$(OBJPATH)/crypt.so: crypt.o
$(CC) $(CFLAGS) -rdynamic -shared $(LDOPTS) -o $@ $< $(LIBS) -lssl
#$(OBJPATH)/%.so: %.o
# $(CC) $(CFLAGS) -rdynamic -shared $(LDOPTS) -o $@ $< $(LIBS) -lssl -lcrypto -lm
$(OBJPATH)/%.so: %.o
$(CC) $(CFLAGS) -shared $(LDOPTS) -o $@ $< $(LIBS) -llpvm -lm -lssl -lcrypto
first: .depend $(SOBJ)
$(MAKE) all
all: $(TARGET)
$(TARGET): $(SOBJ)
-echo Modules Built
install:
-cp *.so $(MUDLIB)/modules
-cp *.lpc $(MUDLIB)/modules
-cp crypt.so $(MUDLIB)/secure
-cp crypt.lpc $(MUDLIB)/secure
tags: $(SRC)
ctags $(SRC)
lint: $(SRC)
tlint $(SRC) > LINT
clean:
-rm -f $(SOBJ) $(OBJ) core
veryclean: clean
-rm -f $(TARGET) tags
# Depend stuff below (do not change!)
xdepend: $(SRC) $(HDRS)
$(CC) -MM $(DEFS) $(SRC) $(INCLUDE) > .depend
.PHONY:
-include .depend