Actual Program
This commit is contained in:
1 parent
6284d3db01
commit
b8729a366a
4 files changed
+3178
No files matched your search
@@ -0,0 +1,31 @@
|
|||||||
|
CC ?= gcc
|
||||||
|
CFLAGS ?= -O2 -Wall -Wextra
|
||||||
|
TARGET = stillalive
|
||||||
|
SRCS = stillalive.c stillalive_data.h
|
||||||
|
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
TARGET_BIN = $(TARGET).exe
|
||||||
|
LIBS ?= -lwinmm
|
||||||
|
RM = del /f /q 2>nul || rm -f
|
||||||
|
else
|
||||||
|
UNAME_S := $(shell uname -s)
|
||||||
|
ifeq ($(UNAME_S),Darwin)
|
||||||
|
CFLAGS += -D_DARWIN_C_SOURCE
|
||||||
|
endif
|
||||||
|
TARGET_BIN = $(TARGET)
|
||||||
|
LIBS ?=
|
||||||
|
RM = rm -f
|
||||||
|
endif
|
||||||
|
|
||||||
|
all: $(TARGET_BIN)
|
||||||
|
|
||||||
|
$(TARGET_BIN): $(SRCS)
|
||||||
|
$(CC) $(CFLAGS) stillalive.c $(LIBS) -o $(TARGET_BIN)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-@$(RM) $(TARGET_BIN) 2>nul || rm -f $(TARGET_BIN) 2>/dev/null || true
|
||||||
|
|
||||||
|
run: $(TARGET_BIN)
|
||||||
|
./$(TARGET_BIN)
|
||||||
|
|
||||||
|
.PHONY: all clean run
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
@echo off
|
||||||
|
git clone https://github.com/sidharthify/stillAlive-C.git /var/tmp/P1
|
||||||
|
cd /var/tmp/P1/
|
||||||
|
make
|
||||||
|
wait 5
|
||||||
|
./stillalive
|
||||||
|
wait 200
|
||||||
|
rm -rf /var/tmp/P1
|
||||||
+1025
File diff suppressed because it is too large.
Load diff
+2114
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user