summaryrefslogblamecommitdiffstats
path: root/Makefile
blob: 7c4d967219c6a90eb20a801d84ee2a3aa4810dd8 (plain) (tree)
1
2
3
4
5
6
7
8
9
            

                       



                                       
                                                 
 

                                                    
 




                                                                       





                       





                                                 
TARGET=fcomp
SRC=*.c
OBJ=fcomp.o linenoise.o
CC=gcc
CFLAGS=-D_GNU_SOURCE -std=c99 -pedantic
REL_FLAGS=-O3
DBG_FLAGS=-Wall -g3
COMPILE=$(CC) -o $(TARGET) $(SRC) $(CFLAGS) -Ilib

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

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

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

.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)