aboutsummaryrefslogtreecommitdiffstats
path: root/util/szap/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--util/szap/Makefile39
1 files changed, 11 insertions, 28 deletions
diff --git a/util/szap/Makefile b/util/szap/Makefile
index 680793c..b341c74 100644
--- a/util/szap/Makefile
+++ b/util/szap/Makefile
@@ -1,35 +1,18 @@
-CC = gcc
-CFLAGS = -MD -Wall -g -O2 -I../../include -I../lib
-LFLAGS = -Wall -g -O2
-RM = rm -f
+# Makefile for linuxtv.org dvb-apps/util/szap
-TARGETS = szap tzap czap azap femon
-OBJS = szap.o tzap.o czap.o azap.o femon.o
+objects = lnb.o
-all: $(OBJS) $(TARGETS)
- @echo
- @echo "--------------------------------------------------------------------------------"
- @echo " please copy an appropriate channels.conf-XXX channel list for DVB-S/C/T"
- @echo
- @echo " to ~/.szap/channels.conf"
- @echo " ~/.czap/channels.conf"
- @echo " ~/.tzap/channels.conf"
- @echo
- @echo " and then call ./szap for DVB-S, ./czap for DVB-C or ./tzap for DVB-T"
- @echo "--------------------------------------------------------------------------------"
- @echo
+binaries = azap \
+ czap \
+ szap \
+ tzap
-szap: szap.o ../lib/lnb.o
- $(CC) $(LFLAGS) -o szap szap.o ../lib/lnb.o
+inst_bin = $(binaries)
-.c.o:
- $(CC) $(CFLAGS) -o $@ -c $<
+.PHONY: all
-.o:
- $(CC) $(LFLAGS) -o $@ $<
+all: $(binaries)
-clean:
- $(RM) $(TARGETS) core* *.o *.d .depend
-
--include $(wildcard *.d) dummy
+$(binaries): $(objects)
+include ../../Make.rules
r: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/**
 * crc32 calculation routines.
 *
 * Copyright (c) 2005 by Andrew de Quincey <adq_dvb@lidskialf.net>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 */

#ifndef _UCSI_CRC32_H
#define _UCSI_CRC32_H 1

#include <stdint.h>

#ifdef __cplusplus
extern "C"
{
#endif

#define CRC32_INIT (~0)

extern uint32_t crc32tbl[];

/**
 * Calculate a CRC32 over a piece of data.
 *
 * @param crc Current CRC value (use CRC32_INIT for first call).
 * @param buf Buffer to calculate over.
 * @param len Number of bytes.
 * @return Calculated CRC.
 */
static inline uint32_t crc32(uint32_t crc, uint8_t* buf, size_t len)
{
	size_t i;

	for (i=0; i< len; i++) {
		crc = (crc << 8) ^ crc32tbl[((crc >> 24) ^ buf[i]) & 0xff];
	}

	return crc;
}

#ifdef __cplusplus
}
#endif

#endif