File: Makefile

package info (click to toggle)
simtools 0~git20171013%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,544 kB
  • sloc: ansic: 26,585; makefile: 589; perl: 57; sh: 43
file content (86 lines) | stat: -rw-r--r-- 1,675 bytes parent folder | download
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
# *** NOTE ***
# This makefile is set up for Linux.  It will need some (small) changes to
# build under something else.  See notes in comments below, marked with ***

VERSION = 2.5

# objects
OBJS=\
	rstsflx.o \
	fip.o \
	rtime.o \
	filename.o \
	doget.o \
	dolist.o \
	doalloc.o \
	docomp.o \
	dotype.o \
	doput.o \
	dodump.o \
	dodelete.o \
	dorename.o \
	dorts.o \
	doprot.o \
	dodir.o \
	doident.o \
	doinit.o \
	dohook.o \
	scancmd.o \
	doclean.o \
	fileio.o \
	diskio.o \
	absio.o

# Flags and the like

# *** change the two lines below as needed for your C compiler.
CC ?= gcc
OPTIMIZE ?= -O2 -g2
LDFLAGS ?= -g2

DEFINES = 
CFLAGS = $(OPTIMIZE) $(DEFINES) $(EXTRAFLAGS)

KITNAME = flx-$(VERSION)
DIR = flx

# Rules

S = $(OBJS:.o=.c) 
SRCS = $(S:absio.c=unxabsio.c)

# ***  comment out or delete this first rule if not building on DOS
#flx.exe: flx
#	strip flx
#	coff2exe -s /djgpp/bin/go32.exe flx

flx: $(OBJS)
	$(CC) $(CFLAGS) $(LDFLAGS) -o flx $(OBJS) $(EXTRAOBJS) -lreadline -lncurses $(EXTRAFLAGS)

# *** the rule below builds absio.o.  You need to use as source file
# *** an appropriate file; in Unix that's probably unxabsio.c but check
# *** the source file to be sure.

absio.o: unxabsio.c
	$(CC) -c -o absio.o $(CPPFLAGS) $(CFLAGS) $<

# general build rule for all other object files:
.c.o:
	$(CC) -c $(CPPFLAGS) $(CFLAGS) $<

kit:
	rm -f *~
	cd ..; tar cvzf $(KITNAME).tar.gz \
	$(DIR)/README $(DIR)/COPYING $(DIR)/BUGS $(DIR)/HISTORY \
	$(DIR)/Makefile* $(DIR)/*.c $(DIR)/*.h \
	$(DIR)/*.doc $(DIR)/*.pdf $(DIR)/fdprm

clean:
	rm -f *.o flx flx.exe flx.dep


flx.dep:
	gcc -MM $(SRCS) > flx.dep

# the one below is created by make depend
include flx.dep