GMS Linux: start?

This commit is contained in:
2025-12-30 01:20:20 +00:00
commit ac241a9148
48 changed files with 2028 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
TARGET = rm
SRCS = rm.c
CC = gcc
CFLAGS = -static -Wall
OUT_BIN ?= $(TARGET)
all: $(OUT_BIN)
$(OUT_BIN): $(SRCS)
@echo " [CC] Compiling to $(OUT_BIN)..."
$(CC) $(CFLAGS) -o $@ $^
clean:
rm -f $(TARGET)
+17
View File
@@ -0,0 +1,17 @@
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
int main(int argc, char *argv[]) {
if (argc != 2) {
printf("Usage: rm <filename>\n");
return 1;
}
if (unlink(argv[1]) < 0) {
perror("rm");
return 1;
}
return 0;
}