# Allow overriding xeno-config on make command line XENO_CONFIG=xeno-config prefix := $(shell $(XENO_CONFIG) --prefix) ifeq ($(prefix),) $(error Please add /bin to your PATH variable) endif GCIC := $(prefix)/bin/gcic SIM_CFLAGS := -g SIM_LDFLAGS := -lnative_sim SIM_TARGETS := pip-chain sim: $(SIM_TARGETS) all: sim $(SIM_TARGETS): $(SIM_TARGETS:%=%.o) $(GCIC) -o $@ $^ $(SIM_LDFLAGS) %.o: %.c $(GCIC) -o $@ -c $< $(SIM_CFLAGS) clean: $(RM) -f *.o *_s.o $(SIM_TARGETS)