2003-06-25 13:34:59 +02:00
|
|
|
CC=gcc
|
2004-05-28 16:11:54 +02:00
|
|
|
CPPFLAGS=
|
2012-03-30 21:11:04 +02:00
|
|
|
CFLAGS= -g -Wall -Werror $(CPPFLAGS)
|
2003-06-11 23:55:00 +02:00
|
|
|
CPROF_FLAGS=-pg -fprofile-arcs
|
2016-04-14 16:48:41 +02:00
|
|
|
BUILD_DIR=build
|
2003-04-22 20:44:01 +02:00
|
|
|
|
2016-04-14 16:48:41 +02:00
|
|
|
default: $(BUILD_DIR)/romcc
|
2003-04-22 20:44:01 +02:00
|
|
|
|
2016-04-14 16:48:41 +02:00
|
|
|
$(BUILD_DIR)/romcc: romcc.c $(BUILD_DIR)
|
2003-04-22 20:44:01 +02:00
|
|
|
$(CC) $(CFLAGS) -o $@ $<
|
|
|
|
|
2016-04-14 16:48:41 +02:00
|
|
|
$(BUILD_DIR)/romcc_pg: romcc.c $(BUILD_DIR)
|
2003-06-11 23:55:00 +02:00
|
|
|
$(CC) $(CFLAGS) $(CPROF_FLAGS) -o $@ $<
|
|
|
|
|
2016-04-14 16:48:41 +02:00
|
|
|
$(BUILD_DIR):
|
|
|
|
mkdir -p $(BUILD_DIR)
|
2003-10-11 08:20:25 +02:00
|
|
|
|
2016-04-14 16:48:41 +02:00
|
|
|
test: $(BUILD_DIR)/romcc
|
|
|
|
./test.sh all
|
2003-04-22 20:44:01 +02:00
|
|
|
|
2016-04-14 16:48:41 +02:00
|
|
|
test-simple: $(BUILD_DIR)/romcc
|
|
|
|
./test.sh simple
|
2003-06-28 08:49:45 +02:00
|
|
|
|
2016-04-14 16:48:41 +02:00
|
|
|
test-linux: $(BUILD_DIR)/romcc
|
|
|
|
./test.sh linux
|
2003-04-22 20:44:01 +02:00
|
|
|
|
2016-04-14 16:48:41 +02:00
|
|
|
clean distclean:
|
|
|
|
rm -rf $(BUILD_DIR)
|
2003-06-28 08:49:45 +02:00
|
|
|
|
2016-04-14 16:48:41 +02:00
|
|
|
.PHONY: all test test-simple test-linux clean distclean
|