29 lines
624 B
Makefile
29 lines
624 B
Makefile
|
include ../Makefile.common
|
||
|
|
||
|
ifeq ($(OS),LINUX)
|
||
|
CFLAGS += -Ilib -Ilib/x11
|
||
|
OBJ = $(patsubst %.c,%.o,$(wildcard lib/x11/*.c))
|
||
|
else
|
||
|
CFLAGS += -Ilib -Ilib/win32
|
||
|
OBJ = $(patsubst %.c,%.o,$(wildcard lib/win32/*.c))
|
||
|
endif
|
||
|
|
||
|
OBJ += $(patsubst %.c,%.o,$(wildcard lib/*.c))
|
||
|
LIBNAME = libglfw.a
|
||
|
|
||
|
all: $(LIBNAME)
|
||
|
|
||
|
$(LIBNAME): $(OBJ)
|
||
|
@echo Creating archive $@
|
||
|
@ar -crsu $@ $(OBJ)
|
||
|
@echo
|
||
|
|
||
|
clean:
|
||
|
-@$(RM) lib$(SLASH)*.o
|
||
|
-@$(RM) lib$(SLASH)*.d
|
||
|
-@$(RM) lib$(SLASH)x11$(SLASH)*.o
|
||
|
-@$(RM) lib$(SLASH)x11$(SLASH)*.d
|
||
|
-@$(RM) lib$(SLASH)win32$(SLASH)*.o
|
||
|
-@$(RM) lib$(SLASH)win32$(SLASH)*.d
|
||
|
-@$(RM) $(LIBNAME)
|