Skip to content

Commit

Permalink
lenovolegionlinux-git: add patched Makefile
Browse files Browse the repository at this point in the history
Signed-off-by: Gonçalo Negrier Duarte <[email protected]>
  • Loading branch information
MrDuartePT committed Dec 31, 2024
1 parent 318486c commit cab10f2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
24 changes: 24 additions & 0 deletions packages/lenovolegionlinux-git/Makefile-debian
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
CC ?= clang

CFLAGS ?= -O2
CFLAGS += -Wall -linih

SRC = $(wildcard ini.c modules/*.c)
OBJ = $(SRC:.c=.o)

TARGET = legiond legiond-ctl
all: $(TARGET)

legiond: $(OBJ) legiond.o
$(CC) $(CFLAGS) $(OBJ) legiond.o -o legiond

legiond-ctl: legiond-ctl.o
$(CC) $(CFLAGS) legiond-ctl.o -o legiond-ctl

%.o : %.c
$(CC) $(CFLAGS) -c $< -o $@

clean:
rm -f $(OBJ) $(TARGET) legiond.o legiond-ctl.o

.PHONY: all clean
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ build() {
# Compile legiond daemon
cd legion_linux/extra/service/legiond
cp "${srcdir}/ini.c" ./
sed -i "s/SOURCE1 = \$(TARGET1).c modules\/\*\.c/SOURCE1 = \$(TARGET1).c ini.c modules\/\*\.c/g" Makefile
cp "${srcdir}/Makefile-debian" ./Makefile
make
}

Expand Down

0 comments on commit cab10f2

Please sign in to comment.