Makefile 649 Bytes
Newer Older
1
2
3
4
5
6
# define main target
PROG = py
all: $(PROG)

# include py core make definitions
include ../py/py.mk
7

8
9
10
11
# program for deletion
RM = /bin/rm

# compiler settings
12
CC = gcc
13
CFLAGS = -I. -I$(PY_SRC) -Wall -Werror -ansi -std=gnu99 -Os #-DNDEBUG
14
LDFLAGS = -lm
15

16
# source files
17
18
19
SRC_C = \
	main.c \

20
OBJ = $(addprefix $(BUILD)/, $(SRC_C:.c=.o)) $(PY_O)
Damien's avatar
Damien committed
21
LIB = -lreadline
22
23
# the following is needed for BSD
#LIB += -ltermcap
24
25
26

$(PROG): $(BUILD) $(OBJ)
	$(CC) -o $@ $(OBJ) $(LIB) $(LDFLAGS)
27
28
	strip $(PROG)
	size $(PROG)
29
30
31
32

$(BUILD)/%.o: %.c
	$(CC) $(CFLAGS) -c -o $@ $<

33
$(BUILD)/main.o: mpconfigport.h
34
35

clean:
36
37
	$(RM) -f $(PROG)
	$(RM) -rf $(BUILD)
38

39
.PHONY: all clean