You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

63 lines
934 B

MAKE=gmake
DEFS=
SRCS= descriptor.c \
epg.c \
file.c \
huffman.c \
main.c \
util.c
HDRS= descriptor.h \
epg.h \
lint.h \
util.h
OBJS= $(SRCS:.c=.o)
CC=gcc
#CC=mipsel-linux-gcc
CFLAGS=-g
INCS=
LIBS=
#CFLAGS=-g -O3 -fno-strict-aliasing
#WARN=-pedantic -Wall -Wnested-externs -Wpointer-arith -Werror -Wno-unused
WARN=-pedantic -Wall -W -Wnested-externs -Wpointer-arith -Wno-long-long
PLATFORM=$(shell uname -s | cut -d- -f1)
ifeq ($(PLATFORM),Linux)
DEFS=-DHAVE_SQLITE3
LIBS=-lsqlite3 -lxconv
endif
all: tags epg
install: epg
strip epg
cp epg /mod/bin/epg
epg: ${OBJS}
@echo "Linking..."
@-[ -f $@ ] && mv $@ $@~ || exit 0
${CC} -static-libgcc \
${WARN} \
${DEFS} \
${CFLAGS} -o $@ \
${OBJS} \
${LIBS}
@echo "Done..."
clean:
@-touch core
rm -f epg epg~ core tags ${OBJS}
tags:
@-ctags *.[ch] 2>> /dev/null
.c.o:
@echo " $<"
@$(CC) $(CFLAGS) ${WARN} ${DEFS} ${INCS} -c $< -o $@
${OBJS}: ${HDRS}