[go: up one dir, main page]

Menu

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

Download this file

115 lines (86 with data), 2.0 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
#
# LPVM Makefile
#
# LPC Virtual Machine
#
# Requires "gnumake"
#
# $Id: Makefile,v 1.3 2002/05/29 10:42:13 dredd Exp $
#
# $Source: /cvsroot/swlpc/swlpc/lpvm/Makefile,v $
# $Revision: 1.3 $
# $Date: 2002/05/29 10:42:13 $
# $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
include ../vsn.mk
# Target Name
TARGET=lpvm.so
STARGET=lpvm.a
#
# Some operating system dependent trickery
#
OBJPATH=.
VPATH=$(OBJPATH)
#
# Compiler Stuff
#
INCLUDE=-I. -I../GC
#
# The compiler source code
#
SRC = \
debug_malloc.c \
error.c \
fatal.c \
hash.c \
stack.c \
stack_alloc.c \
stralloc.c \
strncpy.c \
value.c
#
# Define the object code
#
OBJ := $(SRC:%.c=$(OBJPATH)/%.o)
#
# Find local headers
#
HDRS := $(shell echo *.h)
$(OBJPATH)/%.o: %.c
$(CC) $(PROF) -c $(CFLAGS) $(DEFS) $(INCLUDE) $< -o $@
first: depend
$(MAKE) all
all: $(TARGET)
static: $(STARGET)
$(TARGET): $(OBJ)
-mv ../lib/lib$(TARGET).$(VERSION) ../lib/lib$(TARGET).$(VERSION)~
$(CC) $(CFLAGS) -shared $(LDOPTS) -o ../lib/lib$(TARGET).$(VERSION) $(OBJ) $(LIBS)
-rm ../lib/lib$(TARGET)
-ln -s ../lib/lib$(TARGET).$(VERSION) ../lib/lib$(TARGET)
$(STARGET): $(OBJ)
-mv ../lib/lib$(STARGET).$(VERSION) ../lib/lib$(STARGET).$(VERSION)~
$(AR) cr ../lib/lib$(STARGET).$(VERSION) $(OBJ)
-rm ../lib/lib$(STARGET)
-ln -s ../lib/lib$(STARGET).$(VERSION) ../lib/lib$(STARGET)
tags: $(SRC)
ctags $(SRC)
lint: $(SRC)
tlint $(SRC) > LINT
clean:
-rm -f $(OBJ) core
veryclean: clean
-rm -f $(TARGET) tags
# Depend stuff below (do not change!)
depend: $(SRC) $(HDRS)
$(CC) -MM $(DEFS) $(SRC) $(INCLUDE) > .depend
.PHONY:
-include .depend