File: makefile

package info (click to toggle)
brandy 1.23.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,268 kB
  • sloc: ansic: 39,421; makefile: 91; sh: 1
file content (104 lines) | stat: -rw-r--r-- 2,239 bytes parent folder | download | duplicates (2)
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
# Makefile for brandy under NetBSD and Linux

CC = gcc
LD = gcc
STRIP = strip
ADDFLAGS = ${BRANDY_BUILD_FLAGS}

include build/git.mk

#CFLAGS = -g -DDEBUG $(shell sdl-config --cflags)  -I/usr/local/include/SDL -DUSE_SDL -DDEFAULT_IGNORE -Wall $(GITFLAGS) $(ADDFLAGS)
#CFLAGS = -g $(shell sdl-config --cflags)  -I/usr/local/include/SDL -DUSE_SDL -DDEFAULT_IGNORE -Wall $(GITFLAGS) $(ADDFLAGS)
CFLAGS = -O3 -fPIE $(shell sdl-config --cflags) -DUSE_SDL -DDEFAULT_IGNORE -Wall $(GITFLAGS) $(ADDFLAGS)

LDFLAGS +=

LIBS = -lm $(shell sdl-config --libs) -ldl -pthread -lrt -lX11

SRCDIR = src

OBJ = \
	$(SRCDIR)/evaluate.o \
	$(SRCDIR)/graphsdl.o \
	$(SRCDIR)/assign.o \
	$(SRCDIR)/mainstate.o \
	$(SRCDIR)/tokens.o \
	$(SRCDIR)/mos.o \
	$(SRCDIR)/commands.o \
	$(SRCDIR)/functions.o \
	$(SRCDIR)/iostate.o \
	$(SRCDIR)/variables.o \
	$(SRCDIR)/fileio.o \
	$(SRCDIR)/soundsdl.o \
	$(SRCDIR)/keyboard.o \
	$(SRCDIR)/miscprocs.o \
	$(SRCDIR)/editor.o \
	$(SRCDIR)/stack.o \
	$(SRCDIR)/mos_sys.o \
	$(SRCDIR)/strings.o \
	$(SRCDIR)/lvalue.o \
	$(SRCDIR)/errors.o \
	$(SRCDIR)/convert.o \
	$(SRCDIR)/brandy.o \
	$(SRCDIR)/statement.o \
	$(SRCDIR)/net.o \
	$(SRCDIR)/heap.o

SRC = \
	$(SRCDIR)/evaluate.c \
	$(SRCDIR)/graphsdl.c \
	$(SRCDIR)/assign.c \
	$(SRCDIR)/mainstate.c \
	$(SRCDIR)/tokens.c \
	$(SRCDIR)/mos.c \
	$(SRCDIR)/commands.c \
	$(SRCDIR)/functions.c \
	$(SRCDIR)/iostate.c \
	$(SRCDIR)/variables.c \
	$(SRCDIR)/fileio.c \
	$(SRCDIR)/soundsdl.c \
	$(SRCDIR)/keyboard.c \
	$(SRCDIR)/miscprocs.c \
	$(SRCDIR)/editor.c \
	$(SRCDIR)/stack.c \
	$(SRCDIR)/mos_sys.c \
	$(SRCDIR)/strings.c \
	$(SRCDIR)/lvalue.c \
	$(SRCDIR)/errors.c \
	$(SRCDIR)/convert.c \
	$(SRCDIR)/brandy.c \
	$(SRCDIR)/statement.c \
	$(SRCDIR)/net.c \
	$(SRCDIR)/heap.c

brandy:	$(OBJ)
	@echo ""
	@echo "Build flags: $(CFLAGS)"
	$(LD) $(LDFLAGS) -o brandy $(OBJ) $(LIBS)

include build/depends.mk

recompile:
	$(CC) $(CFLAGS) $(SRC) $(LIBS) -o brandy

nodebug:
	$(CC) $(CFLAGS2) $(SRC) $(LIBS) -o brandy
	$(STRIP) brandy

check:
	$(CC) $(CFLAGS) -Wall -O2 $(SRC) $(LIBS) -o brandy

clean:
	rm -f $(SRCDIR)/*.o brandy

cleanall:
	rm -f $(SRCDIR)/*.o brandy sbrandy tbrandy

text:
	$(MAKE) -f makefile.text

textclean:
	rm -f $(SRCDIR)/*.o sbrandy tbrandy

all:	brandy