epg/Makefile

65 lines
947 B
Makefile
Raw Permalink Normal View History

2011-06-01 23:34:35 +00:00
MAKE=gmake
DEFS=
2011-06-01 23:34:35 +00:00
SRCS= descriptor.c \
2011-06-02 11:14:43 +00:00
epg.c \
2011-06-01 23:34:35 +00:00
file.c \
2011-06-05 18:23:29 +00:00
huffman.c \
2011-06-01 23:34:35 +00:00
main.c \
util.c
2011-06-02 11:14:43 +00:00
HDRS= descriptor.h \
epg.h \
lint.h \
2023-02-18 01:42:01 +00:00
util.h \
xgetopt.h
2011-06-02 11:14:43 +00:00
2011-06-01 23:34:35 +00:00
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
2011-09-29 21:48:59 +00:00
PLATFORM=$(shell uname -s | cut -d- -f1)
ifeq ($(PLATFORM),Linux)
DEFS=-DHAVE_SQLITE3
2017-03-09 15:25:49 +00:00
LIBS=-lsqlite3 -lxconv
2011-09-29 21:48:59 +00:00
endif
2011-06-01 23:34:35 +00:00
all: tags epg
2013-03-12 23:30:59 +00:00
install: epg
strip epg
cp epg /mod/bin/epg
2011-06-01 23:34:35 +00:00
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}
2011-06-01 23:34:35 +00:00
tags:
@-ctags *.[ch] 2>> /dev/null
.c.o:
@echo " $<"
@$(CC) $(CFLAGS) ${WARN} ${DEFS} ${INCS} -c $< -o $@
2011-06-02 11:14:43 +00:00
${OBJS}: ${HDRS}
2011-06-01 23:34:35 +00:00