diff options
author | Joursoir <chat@joursoir.net> | 2021-05-22 11:15:03 +0000 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2021-05-22 11:15:03 +0000 |
commit | 9ec67871aebb039de696b2ee531a8759fc6e2e42 (patch) | |
tree | 43630ed025a6089aaa67a8af8498beaa509a8122 | |
parent | 462e43c26a4cfdb4204eb37d1040217fa2475b36 (diff) | |
download | ctimeline-9ec67871aebb039de696b2ee531a8759fc6e2e42.tar.gz ctimeline-9ec67871aebb039de696b2ee531a8759fc6e2e42.tar.bz2 ctimeline-9ec67871aebb039de696b2ee531a8759fc6e2e42.zip |
makefile: rewrite dummy to complete version
-rw-r--r-- | Makefile | 31 |
1 files changed, 26 insertions, 5 deletions
@@ -1,9 +1,30 @@ CC = gcc CFLAGS = -Wall -g -SOURCES = xstring.c ctimeline.c +SOURCES = xstring.c ui-common.c ctimeline.c OBJECTS = ${SOURCES:.c=.o} -EXECUTABLE = app -all: - @$(CC) $(DEFINES) $(CFLAGS) -c $(SOURCES) - @$(CC) $(DEFINES) $(CFLAGS) -o $(EXECUTABLE) $(OBJECTS) +CTIMELINE_PATH = /var/www/html/ctimeline +CTIMELINE_ELF = ctimeline.cgi +CTIMELINE_CSS = ctimeline.css + +.PHONY: all clean install uninstall + +all: $(CTIMELINE_ELF) + +$(CTIMELINE_ELF): $(OBJECTS) + $(CC) $(CFLAGS) -o $(CTIMELINE_ELF) $(OBJECTS) + +%.o: %.c + $(CC) $(CFLAGS) -c $< -o $@ + +clean: + rm -rf $(CTIMELINE_ELF) $(OBJECTS) + +install: all + install -m 755 -d $(CTIMELINE_PATH) + install -m 755 $(CTIMELINE_ELF) $(CTIMELINE_PATH)/$(CTIMELINE_ELF) + install -m 755 $(CTIMELINE_CSS) $(CTIMELINE_PATH)/$(CTIMELINE_CSS) + +uninstall: + rm -f $(CTIMELINE_PATH)/$(CTIMELINE_ELF) + rm -f $(CTIMELINE_PATH)/$(CTIMELINE_CSS) |