-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
88 lines (72 loc) · 1.99 KB
/
Makefile
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
#*****************************************************************************
#
# Copyright (C) 2001 Steve Connet. All rights reserved.
#
# Source File Name : makefile
# Author : Steve Connet
#
# Version : $Id: Makefile,v 1.3 2002/02/23 04:14:33 steve Exp $
#
# Revision History : makefile for the ConnetUtils library
#
# $Log: Makefile,v $
# Revision 1.3 2002/02/23 04:14:33 steve
# added Stopwatch.h
#
# Revision 1.2 2002/01/11 03:50:21 steve
# *** empty log message ***
#
# Revision 1.1 2001/11/08 06:17:14 sconnet
# Initial revision
#
#
#*****************************************************************************
SHELL = /bin/sh
TARGET = ConnetUtils
includedir = include
libdir = lib
STDINCDIR = /usr/local/include
#STDLIBDIR = /usr/local/lib
#RELEASE = -O2 -W -Wall -Werror -I$(STDINCDIR) -L$(STDLIBDIR)
#DEBUG = -g -D_DEBUG_ -Wall -I$(STDINCDIR) -L$(STDLIBDIR)
RELEASE = -O2 -W -Wall -Werror -I$(STDINCDIR)
DEBUG = -g -D_DEBUG_ -Wall -I$(STDINCDIR)
CFLAGS = $(DEBUG)
OBJS = UUID.o Mutex.o Server.o Config.o misc.o Thread.o
HDRS = UUID.h Exception.h Singleton.h Mutex.h Server.h Config.h misc.h TriggerQueue.h Thread.h Stopwatch.h
# build the target
$(TARGET): $(OBJS)
@ar -rusv $(TARGET).a $(OBJS)
install: $(TARGET)
@rm -rfv lib$(TARGET).a;
@mv -v $(TARGET).a $(libdir)/lib$(TARGET).a;
@ln -sfv $(libdir)/lib$(TARGET).a;
@for file in $(HDRS); do \
cp -v $$file $(includedir); \
done
release:
$(MAKE) CFLAGS='$(RELEASE)' $(TARGET)
debug:
$(MAKE) CFLAGS='$(DEBUG)' $(TARGET)
# build the OBJS
.cpp.o:
$(CXX) $(CFLAGS) $*.cpp -c -o $@
depend:
makedepend -Y -- $(CFLAGS) -- *.cpp
clean:
@rm -rfv lib$(TARGET).a;
@rm -rfv $(libdir)/lib$(TARGET).a;
@for file in $(OBJS); do \
rm -rfv $$file; \
done;
@for file in $(HDRS); do \
rm -rfv $(includedir)/$$file; \
done
# DO NOT DELETE
Config.o: misc.h Config.h
misc.o: misc.h
Mutex.o: misc.h Mutex.h
Server.o: Server.h Exception.h Mutex.h
testsuite.o: Server.h Exception.h Mutex.h Thread.h
Thread.o: Thread.h
UUID.o: UUID.h