forth/Makefile

44 lines
666 B
Makefile
Raw Normal View History

2021-09-23 21:58:42 +00:00
###############################################################################
# Tyler Perkins
# 9-23-21
# Makefile
#
2021-09-24 01:25:42 +00:00
CC = gcc
2021-09-23 21:58:42 +00:00
FLAGS = -pipe
CFLAGS = -Wall
CFLAGS += -Ofast
2021-09-24 01:25:42 +00:00
CFLAGS += -g
2021-09-23 21:58:42 +00:00
#CFLAGS += -pg
LIBRARIES =
2021-09-24 01:25:42 +00:00
SRC = $(shell find ./src -name '*.c')
OBJ = $(subst .c,.o,$(SRC))
2021-09-23 21:58:42 +00:00
BIN = ./bin
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man
2021-09-24 01:25:42 +00:00
TARGET = forth
2021-09-23 21:58:42 +00:00
MAKEFLAGS += --jobs=4
all : $(OBJ)
@echo LD $@
@$(CC) $(FLAGS) $(CFLAGS) -o $(BIN)/$(TARGET) $(OBJ) $(LIBRARIES)
2021-09-24 01:25:42 +00:00
.c.o :
2021-09-23 21:58:42 +00:00
@echo CC $<
@$(CC) $(FLAGS) $(CFLAGS) $(LIBRARIES) $(DEFINITIONS) -c $< -o $@
install : all
uninstall :
clean :
find . -type f -name '*.o' -delete
rm -rf $(BIN)/*