-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add h series and modify makefile for supporting more models
- Loading branch information
Showing
3 changed files
with
365 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,46 @@ | ||
TARGETS=libdvbapi.so | ||
|
||
CFLAGS += -fPIC -O2 -std=gnu99 -I../include -mglibc -march=34kc | ||
APP_OBJ = dvbapi.o hook.o C_support.o log.o | ||
LIB_TV_MODEL= | ||
CFLAGS += -fPIC -O2 -std=gnu99 | ||
CFLAGS += -ldl -DBUILD_GIT_SHA=\"$(GIT_VERSION)\" | ||
GIT_VERSION := $(shell git describe --dirty --always --abbrev=4) | ||
BRANCH := $(shell git symbolic-ref --short -q HEAD) | ||
|
||
# DEFAULT VERSION INFORMATION | ||
CFLAGS += -DLIB_NAME=\""dvbapi"\" -DLIB_VERSION=\""v0.1"\" -DLIB_TV_MODELS=\""D T-MST"\" | ||
ifeq ($(PLATFORM), D-MST) | ||
LIB_TV_MODEL=${PLATFORM} | ||
APP_OBJ += models/serie_d_mst.o | ||
CFLAGS += -mel -mglibc -march=34kc | ||
endif | ||
|
||
ifeq ($(PLATFORM), H-MST) | ||
LIB_TV_MODEL=${PLATFORM} | ||
APP_OBJ += models/serie_h_mst.o | ||
CFLAGS += | ||
endif | ||
|
||
all: ${TARGETS} | ||
|
||
libdvbapi.so: dvbapi.c hook.c C_support.c log.c models/serie_d_mst.c $(wildcard *.h) $(wildcard ../include/*.h) | ||
$(CROSS)gcc $(filter %.c %.cpp,$^) ${CFLAGS} -mel -shared -Wl,-soname,$@ -o $@ | ||
|
||
clean: | ||
rm -f ${TARGETS} | ||
|
||
ifeq (${TARGET_IP}, ) | ||
OBJS = $(APP_OBJ) | ||
LIB:=libdvbapi-${PLATFORM}-${BRANCH}-${GIT_VERSION}.so | ||
|
||
# DEFAULT VERSION INFORMATION | ||
CFLAGS += -DLIB_NAME=\""dvbapi"\" -DLIB_VERSION=\""${BRANCH}"\" -DLIB_TV_MODELS=\""${LIB_TV_MODEL}"\" | ||
|
||
all: libdvbapi.so | ||
ifeq ($(LIB_TV_MODEL), ) | ||
$(error No platform selected!) | ||
endif | ||
|
||
install: ${TARGETS} | ||
ping -c1 -W1 -w1 ${TARGET_IP} >/dev/null && \ | ||
lftp -v -c "open ${TARGET_IP};cd ${TARGET_DEST_DIR};mput $^;" | ||
libdvbapi.so: $(OBJS) | ||
$(CROSS)gcc $(CFLAGS) $(OBJS) -shared -Wl,-soname,$(LIB) -o $(LIB) | ||
|
||
|
||
#$(CROSS)gcc $(CFLAGS) $(OBJS) -shared -Wl,-soname,$@ -o $@ | ||
|
||
.c.o: | ||
$(CROSS)gcc $(CFLAGS) -c -o $@ $< | ||
|
||
clean: | ||
rm -f $(OBJS) ${TARGETS} ./models/*.o | ||
|
||
.PHONY: clean | ||
.PHONY: install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.