summaryrefslogblamecommitdiffstats
path: root/Makefile
blob: 172219fb3dc56108fd63d71df32bdeff7db73890 (plain) (tree)



























                                                                               
TARGET=xlnch
SRC=*.c
CC=gcc
CFLAGS=-D_GNU_SOURCE -std=c99 -pedantic
REL_FLAGS=-O3
DBG_FLAGS=-Wall -g3
LIBS=-l X11

make: $(SRC)
	$(CC) $(REL_FLAGS) $(CFLAGS) -o $(TARGET) $^ $(LIBS)

debug: $(SRC)
	$(CC) $(DBG_FLAGS) -fsanitize=address $(CFLAGS) -o $(TARGET) $^ $(LIBS)

noasan: $(SRC)
	$(CC) $(DBG_FLAGS) $(CFLAGS) -o $(TARGET) $^ $(LIBS)

.PHONY: clean

clean:
	rm -f *.o
	rm -f $(TARGET)

install: $(TARGET)
	@cp -v $(TARGET) /usr/local/bin/$(TARGET)

uninstall:
	@rm -v /usr/local/bin/$(TARGET)