Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
yinwenjie committed Aug 28, 2024
1 parent 5b23c83 commit f940dc7
Show file tree
Hide file tree
Showing 9 changed files with 442 additions and 1,317 deletions.
35 changes: 35 additions & 0 deletions server/Makefile
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
61 changes: 0 additions & 61 deletions server/aesd_thread.c

This file was deleted.

35 changes: 0 additions & 35 deletions server/aesd_thread.h

This file was deleted.

24 changes: 0 additions & 24 deletions server/aesdsocket-start-stop

This file was deleted.

15 changes: 15 additions & 0 deletions server/aesdsocket-start-stop.sh
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
Loading

0 comments on commit f940dc7

Please sign in to comment.