-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
93 lines (79 loc) · 2.19 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
89
90
91
92
93
##############################################################################
## FREXXWARE
##############################################################################
##
## Project: Frexx C Preprocessor
## $Source: /home/user/start/cpp/RCS/makefile,v $
## $Revision: 1.3 $
## $Date: 1994/06/02 09:11:24 $
## $Author: start $
## $State: Exp $
## $Locker: $
##
##############################################################################
## $Log: makefile,v $
# Revision 1.3 1994/06/02 09:11:24 start
# Now uses 'gcc' and -O!
#
# Revision 1.2 1993/11/11 07:16:39 start
# New stuff
#
# Revision 1.1 1993/11/03 09:19:28 start
# Initial revision
#
##
##############################################################################
# Frexx PreProcessor Makefile
#HOST =-tp -B/home/danne/code/cpp/ -Wp\,-Q\,-Dunix\,-Ddpc\,-DAIX
#DEFINES = -Dunix -Dpdc -DAIX -DUNIX -DDEBUG
DEFINES = -Dunix -Dpdc -DUNIX -DDEBUG
DEBUGFLAG = -g
LD = ld
LDFLAGS =
LIB = libgkpp.a
CPP = gkpp
FILECPP = gkcpp
TEMP = templib.o
EXPORT = gkpp.exp
PREFIX = /usr/local
CC = gcc
CFLAGS = $(DEBUGFLAG) $(DEFINES)
AR = ar
ARFLAGS = rv
.SUFFIXES: .o .c .c~ .h .h~ .a .i
OBJS = cpp1.o cpp2.o cpp3.o cpp4.o cpp5.o cpp6.o
FILEOBJS = cpp1.o cpp2.o cpp3.o cpp4.o cpp5.o cpp6.o usecpp.o
# ** compile cpp
#
#all: $(LIB) $(CPP)
all: $(FILECPP)
$(LIB) : $(OBJS) $(EXPORT)
$(LD) $(OBJS) -o $(TEMP) -bE:$(EXPORT) -bM:SRE -T512 -H512 -lc
rm -f $(LIB)
$(AR) $(ARFLAGS) $(LIB) $(TEMP)
rm $(TEMP)
$(CPP) : usecpp.c
$(CC) $(CFLAGS) -o $(CPP) usecpp.c -L. -lfpp
$(FILECPP) : $(FILEOBJS)
$(CC) $(FILEOBJS) -o $(FILECPP)
.c.o:
$(CC) $(CFLAGS) -c $<
cpp1.o:cpp1.c
cpp2.o:cpp2.c
cpp3.o:cpp3.c
cpp4.o:cpp4.c
cpp5.o:cpp5.c
cpp6.o:cpp6.c
memory.o:memory.c
usecpp.o:usecpp.c
clean :
rm -f *.o $(FILECPP)
tgz:
rm -f makefile*~
(dir=`pwd`;name=`basename $$dir`;echo Creates $$name.tar.gz; cd .. ; \
tar -cf $$name.tar `ls $$name/*.[ch] $$name/*.exp $$name/*.fd $$name/makefile*` ; \
gzip $$name.tar ; chmod a+r $$name.tar.gz ; mv $$name.tar.gz $$name/)
install: $(FILECPP)
install "$(FILECPP)" "$(DESTDIR)$(PREFIX)/bin"
uninstall:
rm -f "$(DESTDIR)$(PREFIX)/bin/$(FILECPP)"