-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
yinwenjie
committed
Aug 28, 2024
1 parent
5b23c83
commit f940dc7
Showing
9 changed files
with
442 additions
and
1,317 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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Default Compiler | ||
CC = gcc | ||
# Compiler flags | ||
CFLAGS = -Wall -Werror -g -O0 | ||
# Linker flags | ||
LDFLAGS = -lpthread | ||
# Object files | ||
OBJ=aesdsocket.o | ||
|
||
# Check if CROSS_COMPILE is set | ||
ifdef CROSS_COMPILE | ||
CC=$(CROSS_COMPILE)gcc | ||
endif | ||
|
||
# Default target | ||
all: aesdsocket | ||
|
||
aesdsocket: $(OBJ) | ||
$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS) | ||
|
||
# Pattern rule for object files | ||
%.o: %.c | ||
$(CC) -c -o $@ $< $(CFLAGS) | ||
|
||
# Clean target | ||
clean: | ||
rm -f $(OBJ) aesdsocket | ||
|
||
# Source Files | ||
SRCS = aesdsocket.c | ||
|
||
# Target Executable | ||
TARGET = aesdsocket | ||
|
||
.PHONY: all clean |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh | ||
case "$1" in | ||
start) | ||
echo "Starting aesdsocket" | ||
start-stop-daemon -S -n aesdsocket -a /usr/bin/aesdsocket -- -d | ||
;; | ||
stop) | ||
echo "Stopping aesdsocket" | ||
start-stop-daemon -K SIGTERM -n aesdsocket | ||
;; | ||
*) | ||
echo "Usage: $0 {start|stop}" | ||
exit 1 | ||
esac | ||
exit 0 |
Oops, something went wrong.