-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
64 lines (49 loc) · 1.31 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
#
# Makefile
#
# The programmers desktop calculator. A desktop calculator supporting both
# shifts and mixed base inputs.
#
# Copyright (C) 2001, 2002, 2003, 2004, 2005
# Daniel Thompson <see help function for e-mail>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
TARGET = pdc
CC = $(COMPILER_PREFIX)gcc
CFLAGS += -O2 -g
STRIP = $(COMPILER_PREFIX)strip
ifndef WITHOUT_GCC
CFLAGS += -Wall
endif
ifdef WITH_CMDEDIT
CFLAGS += -DHAVE_CMDEDIT
else
# This assumes a dynamic link to libreadline.dll in .../bin. Defining
# WITHOUT_READLINE should have the normal effect. The .../lib part is just in
# case people do strange things to their layouts.
ifdef WIN32_HOME
CFLAGS += -I$(WIN32_HOME)/include -L$(WIN32_HOME)/lib -L$(WIN32_HOME)/bin
WITHOUT_NCURSES = 1
TARGET := $(TARGET).exe
endif
ifndef WITHOUT_READLINE
LDFLAGS += -lreadline
CFLAGS += -DHAVE_READLINE
endif
ifndef WITHOUT_NCURSES
LDFLAGS += -lncurses
endif
endif
all: $(TARGET)
strip : $(TARGET)
$(STRIP) $(TARGET)
$(TARGET) : y.tab.o
$(CC) $(CFLAGS) -o $@ y.tab.o $(LDFLAGS)
y.tab.c : pdc.y
$(YACC) pdc.y
clean :
$(RM) $(TARGET) y.tab.c *.o