-
Notifications
You must be signed in to change notification settings - Fork 42
/
Makefile
73 lines (59 loc) · 1.69 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
##############################################################################
## FREXXWARE
##############################################################################
#
# Project: Frexx C Preprocessor
#
##############################################################################
# Frexx PreProcessor Makefile
DEFINES = -Dunix -Dpdc -DUNIX -DDEBUG
DEBUGFLAG = -g
LD = ld
LDFLAGS =
LIB = libfpp.a
CPP = fpp
FILECPP = fcpp
TEMP = templib.o
EXPORT = fpp.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 cppdef.h
cpp2.o:cpp2.c cppdef.h
cpp3.o:cpp3.c cppdef.h
cpp4.o:cpp4.c cppdef.h
cpp5.o:cpp5.c cppdef.h
cpp6.o:cpp6.c cppdef.h
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)"