git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@2 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-09-27 14:29:44 +00:00
parent d5013c7df6
commit 7a9fd3bcfb
3 changed files with 47 additions and 0 deletions

38
GNUmakefile Normal file
View File

@@ -0,0 +1,38 @@
# $Id$
TARGET = $(shell uname -s)
CC = gcc
CFLAGS = -fPIC -Iinclude -D_MILSKO
LDFLAGS =
LIBS =
L_OBJS =
ifeq ($(TARGET),NetBSD)
CFLAGS += -I/usr/X11R7/include -I/usr/pkg/include
LDFLAGS += -L/usr/X11R7/lib -L/usr/pkg/lib
UNIX = 1
else ifeq ($(TARGET),Linux)
UNIX = 1
else
$(error Add your platform definition)
endif
ifeq ($(UNIX),1)
LIB = lib
SO = .so
L_OBJS += src/x11.o
L_LIBS += -lX11
endif
.PHONY: all clean
.SUFFIXES: .c .o
all: $(LIB)milsko$(SO)
$(LIB)milsko$(SO): $(L_OBJS)
$(CC) $(LDFLAGS) -shared -o $@ $(L_OBJS) $(L_LIBS)
clean:
rm -f *.dll *.so *.a */*.o

6
include/Milsko/Milsko.h Normal file
View File

@@ -0,0 +1,6 @@
/* $Id$ */
#ifndef __MILSKO_MILSKO_H__
#define __MILSKO_MILSKO_H__
#endif

3
src/x11.c Normal file
View File

@@ -0,0 +1,3 @@
/* $Id$ */
#include <Milsko/Milsko.h>