BASEDIR=..
include $(BASEDIR)/config.mk
-SUBDIRS = scripts webextension
+SUBDIRS = webextension
OBJ = $(patsubst %.c, %.o, $(wildcard *.c))
+JSFILES = $(wildcard scripts/*.js)
all: vimb
clean: $(SUBDIRS:%=%.subdir-clean)
- $(RM) vimb *.o
+ $(RM) vimb *.o scripts/scripts.h
vimb: $(OBJ) webextension.subdir-all
$(CC) $(LDFLAGS) $(OBJ) -o $@
-$(OBJ): scripts.subdir-all config.h $(BASEDIR)/config.mk
+$(OBJ): config.h $(BASEDIR)/config.mk scripts/scripts.h
-include $(OBJ:.o=.d)
@echo create $@ from config.def.h
@cp config.def.h $@
+scripts/scripts.h: $(JSFILES)
+ @echo "create $@ from *.js"
+ @for file in $(JSFILES); do \
+ ./scripts/js2h.sh $$file >> $@; \
+ done
+
%.o: %.c
@echo "${CC} $@"
@$(CC) $(CFLAGS) -c -o $@ $<
+++ /dev/null
-BASEDIR=../..
-include $(BASEDIR)/config.mk
-
-JSFILES = $(wildcard *.js)
-
-all: scripts.h
-
-clean:
- $(RM) scripts.h
-
-scripts.h: $(JSFILES)
- @echo "create $@ from *.js"
- @for file in $(JSFILES); do \
- ./js2h.sh $$file >> $@; \
- done
-
-.PHONY: all clean
-