20 lines
459 B
Makefile
20 lines
459 B
Makefile
|
|
SELF_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
|
|
|
|
objects = $(patsubst %.c,%.o,$(wildcard *.c)) $(patsubst %.cpp,%.o,$(wildcard *.cpp))
|
|
objects_fasm = $(patsubst %.S,%.o,$(wildcard *.S))
|
|
|
|
objects_test = $(patsubst %.c,%.o,$(wildcard test_*.c)) $(patsubst %.cpp,%.o,$(wildcard test_*.cpp))
|
|
objects := $(filter-out $(objects_test),$(objects))
|
|
|
|
|
|
all: $(objects) $(objects_fasm)
|
|
|
|
$(objects_fasm):
|
|
$(FASM) $(patsubst %.o,%.S,$@) $@
|
|
|
|
clean:
|
|
-$(RM) *.o
|
|
|
|
|