2014-01-24 04:05:30 -05:00
|
|
|
include ../py/mkenv.mk
|
|
|
|
|
2014-01-07 09:54:15 -05:00
|
|
|
# define main target
|
|
|
|
PROG = cpy
|
|
|
|
|
|
|
|
# include py core make definitions
|
|
|
|
include ../py/py.mk
|
2013-12-29 13:01:01 -05:00
|
|
|
|
2014-04-16 17:10:33 -04:00
|
|
|
INC = -I.
|
2014-12-27 09:11:49 -05:00
|
|
|
INC += -I..
|
2014-04-16 17:10:33 -04:00
|
|
|
INC += -I$(PY_SRC)
|
2014-04-17 13:03:27 -04:00
|
|
|
INC += -I$(BUILD)
|
2014-04-16 17:10:33 -04:00
|
|
|
|
2014-01-07 09:54:15 -05:00
|
|
|
# compiler settings
|
2014-10-29 05:05:55 -04:00
|
|
|
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -ansi -std=gnu99 -DUNIX
|
2013-12-29 13:01:01 -05:00
|
|
|
LDFLAGS = -lm
|
|
|
|
|
2014-01-26 12:52:23 -05:00
|
|
|
# Debugging/Optimization
|
2014-01-13 08:25:10 -05:00
|
|
|
ifdef DEBUG
|
2014-01-26 12:52:23 -05:00
|
|
|
CFLAGS += -O0 -g
|
2014-01-13 08:25:10 -05:00
|
|
|
else
|
|
|
|
CFLAGS += -Os #-DNDEBUG
|
|
|
|
endif
|
|
|
|
|
2014-01-07 09:54:15 -05:00
|
|
|
# source files
|
2013-12-29 13:01:01 -05:00
|
|
|
SRC_C = \
|
|
|
|
main.c \
|
|
|
|
|
2014-01-21 16:40:13 -05:00
|
|
|
OBJ = $(PY_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
|
2013-12-29 13:01:01 -05:00
|
|
|
LIB =
|
|
|
|
|
2014-01-24 04:05:30 -05:00
|
|
|
include ../py/mkrules.mk
|
2013-12-29 13:01:01 -05:00
|
|
|
|