2014-01-07 07:54:15 -07:00
|
|
|
# define main target
|
|
|
|
PROG = cpy
|
|
|
|
all: $(PROG)
|
|
|
|
|
|
|
|
# include py core make definitions
|
|
|
|
include ../py/py.mk
|
2013-12-29 11:01:01 -07:00
|
|
|
|
2014-01-07 07:54:15 -07:00
|
|
|
# program for deletion
|
|
|
|
RM = /bin/rm
|
|
|
|
|
|
|
|
# compiler settings
|
2013-12-29 11:01:01 -07:00
|
|
|
CC = gcc
|
2014-01-07 07:54:15 -07:00
|
|
|
CFLAGS = -I. -I$(PY_SRC) -Wall -Werror -ansi -std=gnu99 -Os #-DNDEBUG
|
2013-12-29 11:01:01 -07:00
|
|
|
LDFLAGS = -lm
|
|
|
|
|
2014-01-07 07:54:15 -07:00
|
|
|
# source files
|
2013-12-29 11:01:01 -07:00
|
|
|
SRC_C = \
|
|
|
|
main.c \
|
|
|
|
|
2014-01-07 07:54:15 -07:00
|
|
|
OBJ = $(addprefix $(BUILD)/, $(SRC_C:.c=.o)) $(PY_O)
|
2013-12-29 11:01:01 -07:00
|
|
|
LIB =
|
|
|
|
|
|
|
|
$(PROG): $(BUILD) $(OBJ)
|
|
|
|
$(CC) -o $@ $(OBJ) $(LIB) $(LDFLAGS)
|
2014-01-07 07:54:15 -07:00
|
|
|
strip $(PROG)
|
|
|
|
size $(PROG)
|
2013-12-29 11:01:01 -07:00
|
|
|
|
|
|
|
$(BUILD)/%.o: %.c
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
2014-01-03 11:48:53 -07:00
|
|
|
$(BUILD)/main.o: mpconfigport.h
|
2013-12-29 11:01:01 -07:00
|
|
|
|
|
|
|
clean:
|
2014-01-07 07:54:15 -07:00
|
|
|
$(RM) -f $(PROG)
|
|
|
|
$(RM) -rf $(BUILD)
|
2013-12-29 11:01:01 -07:00
|
|
|
|
2014-01-07 07:54:15 -07:00
|
|
|
.PHONY: all clean
|