dexedrine/Makefile
Robert Morrison 0385ff1446
refactor: Use header file, and update makefile
- Move the definitions and includes to a header file.
- Modify the makefile to account for this
- add install to makefile
2023-12-30 17:52:38 +00:00

30 lines
623 B
Makefile

# Define the variables for the compiler and the flags
CC = gcc
CFLAGS = -Wall -g -std=c99 -pedantic
# Define the libraries to link
LIBS = -lsystemd -lbsd
prefix = /usr/local
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
dexpath = $(bindir)/dexedrine
.PHONY: all clean install
# Define the default rule to build the program
all: dexedrine
# Define the rule to compile the source file
dexedrine: dexedrine.c dexedrine.h
$(CC) $(CFLAGS) dexedrine.c -o dexedrine $(LIBS)
# Define the rule to clean the generated files
clean:
rm dexedrine
# Define how to install
install:
install dexedrine $(DESTDIR)$(dexpath)