epg/Makefile

58 lines
889 B
Makefile

MAKE=gmake
DEFS=-DFOXSATPLATFORM -DFOXSATFILE
#DEFS= -DFOXSATFILE
SRCS= descriptor.c \
epg.c \
file.c \
huffman.c \
main.c \
util.c \
epgsql.c
HDRS= descriptor.h \
epg.h \
lint.h \
util.h \
epgsql.h
OBJS= $(SRCS:.c=.o)
#CC=gcc
#CC=mipsel-linux-gcc
CC=mips-linux-gcc
CFLAGS=-g -pthread
INCS=
LIBS=-lsqlite3 -ldl
#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
all: tags 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}