2014-01-07 09:54:15 -05:00
|
|
|
# define main target
|
|
|
|
PROG = py
|
|
|
|
all: $(PROG)
|
|
|
|
|
|
|
|
# include py core make definitions
|
|
|
|
include ../py/py.mk
|
2013-10-12 09:30:21 -04:00
|
|
|
|
2014-01-07 09:54:15 -05:00
|
|
|
# program for deletion
|
|
|
|
RM = /bin/rm
|
|
|
|
|
|
|
|
# compiler settings
|
2013-10-12 09:30:21 -04:00
|
|
|
CC = gcc
|
2014-01-07 09:54:15 -05:00
|
|
|
CFLAGS = -I. -I$(PY_SRC) -Wall -Werror -ansi -std=gnu99 -Os #-DNDEBUG
|
2014-01-02 10:50:33 -05:00
|
|
|
LDFLAGS = -lm
|
2013-10-12 09:30:21 -04:00
|
|
|
|
2014-01-07 09:54:15 -05:00
|
|
|
# source files
|
2013-10-12 09:30:21 -04:00
|
|
|
SRC_C = \
|
|
|
|
main.c \
|
|
|
|
|
2014-01-07 09:54:15 -05:00
|
|
|
OBJ = $(addprefix $(BUILD)/, $(SRC_C:.c=.o)) $(PY_O)
|
2013-10-18 14:58:12 -04:00
|
|
|
LIB = -lreadline
|
2014-01-02 10:50:33 -05:00
|
|
|
# the following is needed for BSD
|
|
|
|
#LIB += -ltermcap
|
2013-10-12 09:30:21 -04:00
|
|
|
|
|
|
|
$(PROG): $(BUILD) $(OBJ)
|
|
|
|
$(CC) -o $@ $(OBJ) $(LIB) $(LDFLAGS)
|
2013-12-21 13:17:45 -05:00
|
|
|
strip $(PROG)
|
|
|
|
size $(PROG)
|
2013-10-12 09:30:21 -04:00
|
|
|
|
|
|
|
$(BUILD)/%.o: %.c
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
2014-01-03 10:15:53 -05:00
|
|
|
$(BUILD)/main.o: mpconfigport.h
|
2013-10-12 09:30:21 -04:00
|
|
|
|
|
|
|
clean:
|
2014-01-07 09:54:15 -05:00
|
|
|
$(RM) -f $(PROG)
|
|
|
|
$(RM) -rf $(BUILD)
|
2013-12-29 13:01:01 -05:00
|
|
|
|
2014-01-07 09:54:15 -05:00
|
|
|
.PHONY: all clean
|